From ed31a909e29b9311f289a0643b76a3816b611cb3 Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Wed, 11 Mar 2020 17:00:41 -0400 Subject: [PATCH] minor reorg and syncing --- anvil.c | 10 +++++----- client.c | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) 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 -- 2.55.0