Skip to content

Commit 7a18fdd

Browse files
committed
compositor-xrender: avoid deprecated 'gdk_error_trap_push/pop'
1 parent 6a113cd commit 7a18fdd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/compositor/compositor-xrender.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include <unistd.h>
3535

3636
#include <gdk/gdk.h>
37+
#include <gdk/gdkx.h>
3738
#include <gtk/gtk.h>
3839

3940
#include <cairo/cairo-xlib.h>
@@ -2722,6 +2723,7 @@ xrender_manage_screen (MetaCompositor *compositor,
27222723
MetaCompScreen *info;
27232724
MetaDisplay *display = meta_screen_get_display (screen);
27242725
Display *xdisplay = meta_display_get_xdisplay (display);
2726+
GdkDisplay *gdk_display = gdk_x11_lookup_xdisplay (xdisplay);
27252727
XRenderPictureAttributes pa;
27262728
XRenderPictFormat *visual_format;
27272729
int screen_number = meta_screen_get_screen_number (screen);
@@ -2732,11 +2734,11 @@ xrender_manage_screen (MetaCompositor *compositor,
27322734
if (meta_screen_get_compositor_data (screen))
27332735
return;
27342736

2735-
gdk_error_trap_push ();
2737+
gdk_x11_display_error_trap_push (gdk_display);
27362738
XCompositeRedirectSubwindows (xdisplay, xroot, CompositeRedirectManual);
27372739
XSync (xdisplay, FALSE);
27382740

2739-
if (gdk_error_trap_pop ())
2741+
if (gdk_x11_display_error_trap_pop (gdk_display))
27402742
{
27412743
g_warning ("Another compositing manager is running on screen %i",
27422744
screen_number);

0 commit comments

Comments
 (0)