]> git.mdlowis.com Git - projs/tide.git/commitdiff
Tweaked pointer tracking to only redraw if the focus has indeeed changed
authorMichael D. Lowis <mike.lowis@gentex.com>
Tue, 2 May 2017 11:58:48 +0000 (07:58 -0400)
committerMichael D. Lowis <mike.lowis@gentex.com>
Tue, 2 May 2017 11:58:48 +0000 (07:58 -0400)
lib/win.c

index 674b6a4c62692c56ed0acd6cef7fafe09b0b8705..688b177bba86bee6553ecc914ac3d0349976aa07 100644 (file)
--- a/lib/win.c
+++ b/lib/win.c
@@ -79,7 +79,6 @@ void win_loop(void) {
     x11_flip();
     while (x11_running()) {
         bool pending = x11_events_await(200 /* ms */);
-        x11_flush();
         if (update_focus() || pending) {
             x11_events_take();
             x11_flip();
@@ -117,7 +116,7 @@ WinRegion win_getregion(void) {
 
 bool win_setregion(WinRegion id) {
     bool changed = true;
-    if (id == TAGS || id == EDIT)
+    if (Focused != id && (id == TAGS || id == EDIT))
         changed = true, Focused = id;
     return changed;
 }