Commits

a_ba committed 3be4614

fixed directives

  • Participants
  • Parent commits 5a6e0cd

Comments (0)

Files changed (1)

 gint refresh_timeout=0;
 #endif
 
-#ifdef COPY_CURSOR
-#define CURSOR_SIZE 64
+#ifdef HAVE_XFIXES
 int xfixes_event_base;
+#endif
 
+#ifdef COPY_CURSOR
+#define CURSOR_SIZE 64
 int copy_cursor = 0;
 Window cursor_window = 0;
 Pixmap cursor_pixmap = 0;
 	return TRUE;
 }
 
+#ifdef USE_XDAMAGE
 void try_refresh_image (Time timestamp);
 gboolean _try_refresh_image_timeout (gpointer data)
 {
 		refresh_timeout = g_timeout_add (next_refresh - timestamp, _try_refresh_image_timeout, NULL);
 	}
 }
+#endif
 
 
 
 			if (window_mapped) {
 				window_mapped = 0;
 				XUnmapWindow(display, window);
-				XUnmapWindow(display, cursor_window);
+#ifdef COPY_CURSOR
+				if(copy_cursor) {
+					XUnmapWindow(display, cursor_window);
+				}
+#endif
 			}
 		} else {
 			if (!window_mapped) {
 				window_mapped = 1;
 				XMapWindow(display, window);
-				XMapWindow(display, cursor_window);
+#ifdef COPY_CURSOR
+				if(copy_cursor) {
+					XMapWindow(display, cursor_window);
+				}
+#endif
 			}
 		}
 	}
 	// catch all X11 events
 	gdk_window_add_filter(NULL, on_x11_event, NULL);
 
-#ifdef USE_XDAMAGE
-	if (!use_xdamage)
+#if USE_XDAMAGE && COPY_CURSOR
+	if (!(use_xdamage && track_cursor))
 #endif
 	{
 		refresh_timer = g_timeout_add (40, &refresh_image, NULL);
 void
 disable()
 {
+#ifdef USE_XDAMAGE
 	if (refresh_timeout) {
 		g_source_remove(refresh_timeout);
 		refresh_timeout = 0;
 	}
+#endif
 	if (refresh_timer) {
 		g_source_remove(refresh_timer);
 		refresh_timer = 0;