]> Pileus Git - ~andy/gtk/blobdiff - gdk/x11/gdkwindow-x11.c
Add GDK_DEBUG=frames
[~andy/gtk] / gdk / x11 / gdkwindow-x11.c
index e70d3fda663c9ca6b82a3ce5265fac34fdaeec8b..ea74baa3f44c0f35272451bd332f9097e639d6d8 100644 (file)
@@ -322,6 +322,18 @@ gdk_x11_window_end_frame (GdkWindow *window)
 
   if (impl->toplevel->current_counter_value % 2 == 1)
     {
+#ifdef G_ENABLE_DEBUG
+      if ((_gdk_debug_flags & GDK_DEBUG_FRAMES) != 0)
+        {
+          XImage *image = XGetImage (GDK_WINDOW_XDISPLAY (window),
+                                     GDK_WINDOW_XID (window),
+                                     0, 0, 1, 1,
+                                     (1 << 24) - 1,
+                                     ZPixmap);
+          XDestroyImage (image);
+        }
+#endif /* G_ENABLE_DEBUG */
+
       /* An increment of 3 means that the frame was not drawn as fast as possible,
        * but rather at a particular time. This can trigger different handling from
        * the compositor.