[gtk-vnc] Enable double buffering on GTK3



commit 3bbaa914d9bfafaf5a4d78867a578bddf5fc9134
Author: Daniel P. Berrange <berrange redhat com>
Date:   Wed Oct 29 16:13:46 2014 +0000

    Enable double buffering on GTK3

 src/vncdisplay.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/vncdisplay.c b/src/vncdisplay.c
index c47f8ee..b990f97 100644
--- a/src/vncdisplay.c
+++ b/src/vncdisplay.c
@@ -2186,7 +2186,19 @@ static void vnc_display_init(VncDisplay *display)
                           GDK_LEAVE_NOTIFY_MASK |
                           GDK_SCROLL_MASK |
                           GDK_KEY_PRESS_MASK);
+    /* We already have off-screen buffers we render to
+     * but with GTK-3 there are problems with overlaid
+     * windows. We end up rendering over the top of the
+     * child overlaid windows despite having a clip
+     * mask set :-( We've turned on GTK3's built-in
+     * double buffering to work around this until we
+     * find a better idea.
+     */
+#if GTK_CHECK_VERSION(3, 0, 0)
+    gtk_widget_set_double_buffered(widget, TRUE);
+#else
     gtk_widget_set_double_buffered(widget, FALSE);
+#endif
 
     priv = display->priv = VNC_DISPLAY_GET_PRIVATE(display);
     memset(priv, 0, sizeof(VncDisplayPrivate));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]