From: Michael D. Lowis Date: Tue, 2 May 2017 15:23:12 +0000 (-0400) Subject: Fixed bug in focus tracking that caused unnecessary redraws X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=5580778b8377169e92b246a4bdcc93d37971116f;p=projs%2Ftide.git Fixed bug in focus tracking that caused unnecessary redraws --- diff --git a/config.mk b/config.mk index b1088fe..61ab9b2 100644 --- a/config.mk +++ b/config.mk @@ -26,6 +26,14 @@ ARFLAGS = rcs # Treat all warnings as errors (poor man's lint?) #CFLAGS += -Wall -Wextra -Werror +# GCC Profiling +ifeq ($(GPROF), 1) + CFLAGS += -pg + LDFLAGS += -pg +endif + # Gcov Coverage -#CFLAGS += --coverage -#LDFLAGS += --coverage +ifeq ($(GCOV), 1) + CFLAGS += --coverage + LDFLAGS += --coverage +endif diff --git a/lib/win.c b/lib/win.c index 688b177..604a3e6 100644 --- a/lib/win.c +++ b/lib/win.c @@ -66,7 +66,7 @@ void win_dialog(char* name) { static bool update_focus(void) { static int prev_x = 0, prev_y = 0; int ptr_x, ptr_y; - bool changed = true; + bool changed = false; x11_mouse_get(&ptr_x, &ptr_y); if (prev_x != ptr_x || prev_y != ptr_y) changed = win_setregion(getregion(ptr_x, ptr_y));