summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gs-visual-gl.c6
-rw-r--r--src/gs-window-x11.c2
2 files changed, 6 insertions, 2 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;
diff --git a/src/gs-window-x11.c b/src/gs-window-x11.c
index 8ba2d37..479c826 100644
--- a/src/gs-window-x11.c
+++ b/src/gs-window-x11.c
@@ -808,7 +808,7 @@ out:
g_free (std_output);
g_free (command);
- return visual;
+ return g_object_ref (visual);
}
#if GTK_CHECK_VERSION (3, 0, 0)