]> git.mdlowis.com Git - projs/tide.git/commitdiff
Fixed bug in focus tracking that caused unnecessary redraws
authorMichael D. Lowis <mike.lowis@gentex.com>
Tue, 2 May 2017 15:23:12 +0000 (11:23 -0400)
committerMichael D. Lowis <mike.lowis@gentex.com>
Tue, 2 May 2017 15:23:12 +0000 (11:23 -0400)
config.mk
lib/win.c

index b1088fecae6094731edf0bb6493caa638fdc0af7..61ab9b2b5ff7022ebe0ad2d9a012ec7fd4bbeffe 100644 (file)
--- 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
index 688b177bba86bee6553ecc914ac3d0349976aa07..604a3e6c516f3b65951310fe8cbc4d9903e5a5f0 100644 (file)
--- 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));