From: Michael D. Lowis Date: Tue, 2 May 2017 11:58:48 +0000 (-0400) Subject: Tweaked pointer tracking to only redraw if the focus has indeeed changed X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=00598c9fdb7735c9d1bc8e4100c4a724cac6893d;p=projs%2Ftide.git Tweaked pointer tracking to only redraw if the focus has indeeed changed --- diff --git a/lib/win.c b/lib/win.c index 674b6a4..688b177 100644 --- 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; }