commit 5d07ac34e426d9bb9d36bd0d1d19e4f2d42085da
Author: Hiltjo Posthuma <[email protected]>
Date:   Sun Nov 20 09:42:26 2022 +0100

    Revert "[dmenu][mouse-support]: add motion support"
    
    This reverts commit b28ae177223c4eba99b844562e103915c01cdb22.
    
    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 bf071a0a..eaacea42 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..c9bc84f 100644
+index 7cf253b..d276a94 100644
 --- a/dmenu.c
 +++ b/dmenu.c
-@@ -528,6 +528,151 @@ draw:
+@@ -528,6 +528,119 @@ draw:
        drawmenu();
  }
  
@@ -118,62 +118,27 @@ index 27b7a30..c9bc84f 100644
 +              }
 +      }
 +}
-+
-+static void
-+motionevent(XButtonEvent *ev)
-+{
-+      struct item *it;
-+
-+      if (ev->window != win)
-+              return;
-+
-+      if (lines > 0) { /* vertical list */
-+              int y = bh;
-+              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 + 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;
-+              }
-+      }
-+}
 +
  static void
  paste(void)
  {
-@@ -586,6 +731,12 @@ run(void)
+@@ -582,6 +695,9 @@ run(void)
                                break;
                        cleanup();
                        exit(1);
 +              case ButtonPress:
 +                      buttonpress(&ev);
-+                      break;
-+              case MotionNotify:
-+                      motionevent(&ev.xbutton);
 +                      break;
                case Expose:
                        if (ev.xexpose.count == 0)
                                drw_map(drw, win, 0, 0, mw, mh);
-@@ -683,7 +834,8 @@ setup(void)
+@@ -679,7 +795,8 @@ setup(void)
        /* create menu window */
        swa.override_redirect = True;
        swa.background_pixel = scheme[SchemeNorm][ColBg].pixel;
 -      swa.event_mask = ExposureMask | KeyPressMask | VisibilityChangeMask;
 +      swa.event_mask = ExposureMask | KeyPressMask | VisibilityChangeMask |
-+                       ButtonPressMask | PointerMotionMask;
++                       ButtonPressMask;
        win = XCreateWindow(dpy, parentwin, x, y, mw, mh, 0,
                            CopyFromParent, CopyFromParent, CopyFromParent,
                            CWOverrideRedirect | CWBackPixel | CWEventMask, 
&swa);
diff --git a/tools.suckless.org/dmenu/patches/mouse-support/index.md 
b/tools.suckless.org/dmenu/patches/mouse-support/index.md
index e035a578..90f28a69 100644
--- a/tools.suckless.org/dmenu/patches/mouse-support/index.md
+++ b/tools.suckless.org/dmenu/patches/mouse-support/index.md
@@ -21,8 +21,6 @@ Mouse actions supported:
 * Scroll down:
   * In horizontal mode: same as left-clicking on right arrow.
   * In vertical mode: show items below.
-* Motion:
-  * Will select stuff.
 
 Download
 --------
@@ -46,4 +44,3 @@ Author
 * Xarchus (for multisel support).
 * prx (for selectbg color on hovered item)
 * Nathan Sketch (for grid compatibility) - <[email protected]>
-* NRK <[email protected]> - Motion support


Reply via email to