]> git.mdlowis.com Git - proto/anvil.git/commitdiff
minor reorg and syncing
authorMichael D. Lowis <mike.lowis@gentex.com>
Wed, 11 Mar 2020 21:00:41 +0000 (17:00 -0400)
committerMichael D. Lowis <mike.lowis@gentex.com>
Wed, 11 Mar 2020 21:00:41 +0000 (17:00 -0400)
anvil.c
client.c

diff --git a/anvil.c b/anvil.c
index 5a7000d21301c92bc3175897c0453d3a0168d7c4..6442aa631c82490bad76e8e76e26bed1538d3140 100644 (file)
--- 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;
index 5fcd42bf5fd5dafdcf02e22624ca1c4138c2a98f..26c3d9e9e5a0a28d1d0444b996a7b5cd2dc17a52 100644 (file)
--- 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