[wiki] [sites] Revert "[dmenu][mouse-support]: fix bug and update description" || Hiltjo Posthuma

From: <git_AT_suckless.org>
Date: Sun, 20 Nov 2022 09:41:17 +0100

commit 9086c44099eceb42ebca04f54c165164cec878ed
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
Date: Sun Nov 20 09:42:09 2022 +0100

    Revert "[dmenu][mouse-support]: fix bug and update description"
    
    This reverts commit a14388cffa89b04540bab8dbee80a5dbc9347d53.
    
    Please make a separate patch for it.

diff --git a/tools.suckless.org/dmenu/patches/mouse-support/dmenu-mousesupport-5.2.diff b/tools.suckless.org/dmenu/patches/mouse-support/dmenu-mousesupport-5.2.diff
index ee52488b..bf071a0a 100644
--- a/tools.suckless.org/dmenu/patches/mouse-support/dmenu-mousesupport-5.2.diff
+++ b/tools.suckless.org/dmenu/patches/mouse-support/dmenu-mousesupport-5.2.diff
_AT_@ -1,8 +1,8 @@
 diff --git a/dmenu.c b/dmenu.c
-index 27b7a30..5363aa1 100644
+index 27b7a30..c9bc84f 100644
 --- a/dmenu.c
 +++ b/dmenu.c
-_AT_@ -528,6 +528,153 @@ draw:
+_AT_@ -528,6 +528,151 @@ draw:
          drawmenu();
  }
  
_AT_@ -122,7 +122,7 @@ index 27b7a30..5363aa1 100644
 +static void
 +motionevent(XButtonEvent *ev)
 +{
-+ struct item *it, *psel = sel;
++ struct item *it;
 +
 + if (ev->window != win)
 + return;
_AT_@ -132,31 +132,29 @@ index 27b7a30..5363aa1 100644
 + for (it = curr; it && it != next; it = it->right) {
 + if (ev->y >= y && ev->y < (y + bh)) {
 + sel = it;
++ drawmenu();
 + break;
 + }
 + y += bh;
 + }
 + } else if (matches) {
-+ int x = inputw + promptw + TEXTW("<");
++ int x = inputw + TEXTW("<");
 + for (it = curr; it && it != next; it = it->right) {
 + int w = textw_clamp(it->text, mw - x - TEXTW(">"));
 + if (ev->x >= x && ev->x < (x + w)) {
 + sel = it;
++ drawmenu();
 + break;
 + }
 + x += w;
 + }
 + }
-+ if (psel != sel) {
-+ calcoffsets();
-+ drawmenu();
-+ }
 +}
 +
  static void
  paste(void)
  {
-_AT_@ -586,6 +733,12 @@ run(void)
+_AT_@ -586,6 +731,12 @@ run(void)
                                  break;
                          cleanup();
                          exit(1);
_AT_@ -169,7 +167,7 @@ index 27b7a30..5363aa1 100644
                  case Expose:
                          if (ev.xexpose.count == 0)
                                  drw_map(drw, win, 0, 0, mw, mh);
-_AT_@ -683,7 +836,8 @@ setup(void)
+_AT_@ -683,7 +834,8 @@ setup(void)
          /* create menu window */
          swa.override_redirect = True;
          swa.background_pixel = scheme[SchemeNorm][ColBg].pixel;
diff --git a/tools.suckless.org/dmenu/patches/mouse-support/index.md b/tools.suckless.org/dmenu/patches/mouse-support/index.md
index 645a5bcf..e035a578 100644
--- a/tools.suckless.org/dmenu/patches/mouse-support/index.md
+++ b/tools.suckless.org/dmenu/patches/mouse-support/index.md
_AT_@ -22,7 +22,7 @@ Mouse actions supported:
   * In horizontal mode: same as left-clicking on right arrow.
   * In vertical mode: show items below.
 * Motion:
- * Will select the hovered item.
+ * Will select stuff.
 
 Download
 --------
Received on Sun Nov 20 2022 - 09:41:17 CET

This archive was generated by hypermail 2.3.0 : Sun Nov 20 2022 - 09:48:40 CET