From: Michael D. Lowis Date: Thu, 5 Apr 2018 01:09:20 +0000 (-0400) Subject: fixed mouse focus handling X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=1e95aad1ad89e8f9ed93950dce7aeed8a292c56e;p=projs%2Ftide.git fixed mouse focus handling --- 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);