commit 9086c44099eceb42ebca04f54c165164cec878ed
Author: Hiltjo Posthuma <[email protected]>
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
@@ -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
-@@ -528,6 +528,153 @@ draw:
+@@ -528,6 +528,151 @@ draw:
        drawmenu();
  }
  
@@ -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;
@@ -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)
  {
-@@ -586,6 +733,12 @@ run(void)
+@@ -586,6 +731,12 @@ run(void)
                                break;
                        cleanup();
                        exit(1);
@@ -169,7 +167,7 @@ index 27b7a30..5363aa1 100644
                case Expose:
                        if (ev.xexpose.count == 0)
                                drw_map(drw, win, 0, 0, mw, mh);
-@@ -683,7 +836,8 @@ setup(void)
+@@ -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
@@ -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
 --------


Reply via email to