From: Michael D. Lowis Date: Wed, 11 Mar 2020 21:00:41 +0000 (-0400) Subject: minor reorg and syncing X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=ed31a909e29b9311f289a0643b76a3816b611cb3;p=proto%2Fanvil.git minor reorg and syncing --- diff --git a/anvil.c b/anvil.c index 5a7000d..6442aa6 100644 --- a/anvil.c +++ b/anvil.c @@ -11,6 +11,11 @@ static void check_for_wm(void) XSync(X.disp, False); } +static inline int PRESSED(int mods, int btn) +{ + return ((mods & (1 << (btn + 7))) == (1 << (btn + 7))); +} + static void xbtnpress(XEvent* e) { XButtonEvent* ev = &(e->xbutton); @@ -45,11 +50,6 @@ static void xbtnrelease(XEvent* e) X.reshaping = 0; } -static inline int PRESSED(int mods, int btn) -{ - return ((mods & (1 << (btn + 7))) == (1 << (btn + 7))); -} - static void xbtnmotion(XEvent* e) { XMotionEvent *ev = &e->xmotion; diff --git a/client.c b/client.c index 5fcd42b..26c3d9e 100644 --- a/client.c +++ b/client.c @@ -147,4 +147,5 @@ void client_focus(Client* c) Focused = c; XSetInputFocus(X.disp, c->win, RevertToPointerRoot, CurrentTime); client_draw(Focused, 1); + XSync(X.disp, False); } \ No newline at end of file