]> git.mdlowis.com Git - projs/tide.git/commitdiff
fixed mouse focus handling
authorMichael D. Lowis <mike@mdlowis.com>
Thu, 5 Apr 2018 01:09:20 +0000 (21:09 -0400)
committerMichael D. Lowis <mike@mdlowis.com>
Thu, 5 Apr 2018 01:09:20 +0000 (21:09 -0400)
lib/x11.c

index e0577da3c8cd1b34fb6589d2a61377ea4b35a448..83ee496e266cabb69670b5f81f48894f69715592 100644 (file)
--- a/lib/x11.c
+++ b/lib/x11.c
@@ -528,8 +528,6 @@ static void xbtnrelease(XEvent* e) {
 }
 
 static void xbtnmotion(XEvent* e) {
-    if ((KeyBtnState & 0x1f00) == 0)
-        win_setregion(getregion(e->xbutton.x, e->xbutton.y));
     KeyBtnState = e->xbutton.state;
     int x = e->xbutton.x, y = e->xbutton.y;
     if (x < Regions[Focused].x) x = Regions[Focused].x;
@@ -657,8 +655,7 @@ static uint32_t getkey(XEvent* e) {
 }
 
 static void mouse_click(int btn, bool pressed, int x, int y) {
-    if ((KeyBtnState & 0x1f00) == 0)
-        win_setregion(getregion(x, y));
+    win_setregion(getregion(x, y));
     WinRegion id = getregion(x, y);
     if (id == FOCUSED && x < Regions[Focused].x)
         x = Regions[Focused].x, id = getregion(x, y);