From 00598c9fdb7735c9d1bc8e4100c4a724cac6893d Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Tue, 2 May 2017 07:58:48 -0400 Subject: [PATCH] Tweaked pointer tracking to only redraw if the focus has indeeed changed --- lib/win.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; } -- 2.54.0