Skip to content
Permalink
Browse files

compositor-xrender: avoid deprecated 'gdk_error_trap_push/pop'

  • Loading branch information...
sc0w committed Dec 31, 2018
1 parent 6a113cd commit 7a18fdde8c216caeca0d6cf7f13c67b3e3ae3806
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/compositor/compositor-xrender.c
@@ -34,6 +34,7 @@
#include <unistd.h>

#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#include <gtk/gtk.h>

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

gdk_error_trap_push ();
gdk_x11_display_error_trap_push (gdk_display);
XCompositeRedirectSubwindows (xdisplay, xroot, CompositeRedirectManual);
XSync (xdisplay, FALSE);

if (gdk_error_trap_pop ())
if (gdk_x11_display_error_trap_pop (gdk_display))
{
g_warning ("Another compositing manager is running on screen %i",
screen_number);

0 comments on commit 7a18fdd

Please sign in to comment.
You can’t perform that action at this time.