summaryrefslogtreecommitdiff
path: root/mate-session
diff options
context:
space:
mode:
authoryetist <[email protected]>2018-06-29 18:33:13 +0800
committerraveit65 <[email protected]>2018-06-30 16:33:50 +0200
commit8f35c049172ab4bb1f73069e6a98f29ab45c4c0b (patch)
tree1f28f5ce0d842f6a6a05920fe51a6904d94f9cdf /mate-session
parenta4540f2622e9e403572e522e1472e032e13f7c83 (diff)
downloadmate-session-manager-8f35c049172ab4bb1f73069e6a98f29ab45c4c0b.tar.bz2
mate-session-manager-8f35c049172ab4bb1f73069e6a98f29ab45c4c0b.tar.xz
replace deprecated gdk_error_trap functions
Diffstat (limited to 'mate-session')
-rw-r--r--mate-session/gsm-inhibit-dialog.c8
-rw-r--r--mate-session/msm-gnome.c19
2 files changed, 16 insertions, 11 deletions
diff --git a/mate-session/gsm-inhibit-dialog.c b/mate-session/gsm-inhibit-dialog.c
index 94a2026..1ea58ed 100644
--- a/mate-session/gsm-inhibit-dialog.c
+++ b/mate-session/gsm-inhibit-dialog.c
@@ -423,10 +423,10 @@ get_pixbuf_for_window (GdkDisplay *gdkdisplay,
pixbuf = pixbuf_get_from_pixmap (display, xpixmap, width, height);
if (xpixmap != None) {
- gdk_error_trap_push ();
+ gdk_x11_display_error_trap_push (gdkdisplay);
XFreePixmap (display, xpixmap);
gdk_display_sync (gdkdisplay);
- gdk_error_trap_pop_ignored ();
+ gdk_x11_display_error_trap_pop_ignored (gdkdisplay);
}
if (pixbuf != NULL) {
@@ -958,7 +958,7 @@ gsm_inhibit_dialog_constructor (GType type,
#ifdef HAVE_XRENDER
gdkdisplay = gdk_display_get_default ();
- gdk_error_trap_push ();
+ gdk_x11_display_error_trap_push (gdkdisplay);
if (XRenderQueryExtension (GDK_DISPLAY_XDISPLAY (gdkdisplay), &dialog->priv->xrender_event_base, &dialog->priv->xrender_error_base)) {
g_debug ("GsmInhibitDialog: Initialized XRender extension");
dialog->priv->have_xrender = TRUE;
@@ -967,7 +967,7 @@ gsm_inhibit_dialog_constructor (GType type,
dialog->priv->have_xrender = FALSE;
}
gdk_display_sync (gdkdisplay);
- gdk_error_trap_pop_ignored ();
+ gdk_x11_display_error_trap_pop_ignored (gdkdisplay);
#endif /* HAVE_XRENDER */
/* FIXME: turn this on when it is ready */
diff --git a/mate-session/msm-gnome.c b/mate-session/msm-gnome.c
index 79912d7..5e9cf02 100644
--- a/mate-session/msm-gnome.c
+++ b/mate-session/msm-gnome.c
@@ -171,15 +171,17 @@ msm_compat_gnome_smproxy_startup (void)
Atom gnome_sm_proxy;
Display *dpy;
Window root;
+ GdkDisplay *gdkdisplay;
- gdk_error_trap_push ();
+ gdkdisplay = gdk_display_get_default ();
+ gdk_x11_display_error_trap_push (gdkdisplay);
/* Set GNOME_SM_PROXY property, since some apps (like OOo) seem to require
* it to behave properly. Thanks to Jasper/Francois for reporting this.
* This has another advantage, since it prevents people from running
* gnome-smproxy in xfce4, which would cause trouble otherwise.
*/
- dpy = GDK_DISPLAY_XDISPLAY(gdk_display_get_default());
+ dpy = GDK_DISPLAY_XDISPLAY(gdkdisplay);
root = RootWindow (dpy, 0);
if (gnome_smproxy_window != None)
@@ -196,22 +198,25 @@ msm_compat_gnome_smproxy_startup (void)
(unsigned char *) (void *) &gnome_smproxy_window, 1);
XSync (dpy, False);
- gdk_error_trap_pop_ignored ();
+ gdk_x11_display_error_trap_pop_ignored (gdkdisplay);
}
static void
msm_compat_gnome_smproxy_shutdown (void)
{
- gdk_error_trap_push ();
+ GdkDisplay *gdkdisplay;
+
+ gdkdisplay = gdk_display_get_default ();
+ gdk_x11_display_error_trap_push (gdkdisplay);
if (gnome_smproxy_window != None)
{
- XDestroyWindow (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), gnome_smproxy_window);
- XSync (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), False);
+ XDestroyWindow (GDK_DISPLAY_XDISPLAY(gdkdisplay), gnome_smproxy_window);
+ XSync (GDK_DISPLAY_XDISPLAY(gdkdisplay), False);
gnome_smproxy_window = None;
}
- gdk_error_trap_pop_ignored ();
+ gdk_x11_display_error_trap_pop_ignored (gdkdisplay);
}