From 1e95aad1ad89e8f9ed93950dce7aeed8a292c56e Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Wed, 4 Apr 2018 21:09:20 -0400 Subject: [PATCH] fixed mouse focus handling --- lib/x11.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/x11.c b/lib/x11.c index e0577da..83ee496 100644 --- 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); -- 2.52.0