chiark / gitweb /
GTK 3 port: don't turn off drawing area double buffering.
authorSimon Tatham <anakin@pobox.com>
Sat, 3 Oct 2015 11:28:26 +0000 (12:28 +0100)
committerSimon Tatham <anakin@pobox.com>
Sat, 3 Oct 2015 15:07:20 +0000 (16:07 +0100)
I think I did this in GTK2 on the basis that our server-side cache
pixmap was double-buffering enough for us - any puzzle which erased a
big area with a background rectangle and then redrew over the top of
it would do so only on the off-screen pixmap, and the updates would
only be copied to the visible window after it was all done.

In GTK3, I don't think there's any need - this is all the usual way
things are done anyway, as far as I can see. So I've turned this call
back off, at least until I hear of a reason why I need it again.

gtk.c

diff --git a/gtk.c b/gtk.c
index 6e1ef531ae6b5dabc24b63065965c6cc374aab72..26b3ce0dfe44c6c654b8d7f6b3f80d36362bf49c 100644 (file)
--- a/gtk.c
+++ b/gtk.c
@@ -2573,7 +2573,7 @@ static frontend *new_window(char *arg, int argtype, char **error)
        fe->statusbar = NULL;
 
     fe->area = gtk_drawing_area_new();
-#if GTK_CHECK_VERSION(2,0,0)
+#if GTK_CHECK_VERSION(2,0,0) && !GTK_CHECK_VERSION(3,0,0)
     gtk_widget_set_double_buffered(fe->area, FALSE);
 #endif
     {