summaryrefslogtreecommitdiff
path: root/src/gs-visual-gl.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-11-12 23:56:34 +0100
committerStefano Karapetsas <[email protected]>2013-11-12 23:56:34 +0100
commit79db828acd87190c9c7e1b91bde4b6ec4322224f (patch)
tree14a68e00ac72ce6705a2203393d4603d440ba362 /src/gs-visual-gl.c
parent483b70e814cf2c012a9186da78d15cdbcd3aec1e (diff)
downloadmate-screensaver-79db828acd87190c9c7e1b91bde4b6ec4322224f.tar.bz2
mate-screensaver-79db828acd87190c9c7e1b91bde4b6ec4322224f.tar.xz
Improvements for GTK3
Diffstat (limited to 'src/gs-visual-gl.c')
-rw-r--r--src/gs-visual-gl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gs-visual-gl.c b/src/gs-visual-gl.c
index 8a779e3..e1f2cc1 100644
--- a/src/gs-visual-gl.c
+++ b/src/gs-visual-gl.c
@@ -94,7 +94,7 @@ gs_visual_gl_get_best_for_screen (GdkScreen *screen)
vid = XVisualIDFromVisual (vi->visual);
#if GTK_CHECK_VERSION (3, 0, 0)
- visual = gdk_x11_screen_lookup_visual (gdk_screen_get_default (), vid);
+ visual = gdk_x11_screen_lookup_visual (screen, vid);
#else
visual = gdkx_visual_get (vid);
#endif
@@ -108,8 +108,12 @@ gs_visual_gl_get_best_for_screen (GdkScreen *screen)
}
}
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gdk_error_trap_pop_ignored ();
+#else
gdk_display_sync (display);
gdk_error_trap_pop ();
+#endif
#else
visual = NULL;