diff options
author | raveit65 <[email protected]> | 2018-07-06 13:50:46 +0200 |
---|---|---|
committer | lukefromdc <[email protected]> | 2018-07-09 19:02:19 -0400 |
commit | 7551de5b32663e76df12669ef9a41a3e61160a44 (patch) | |
tree | 51dad52b807e3da7bff4497bae319e2bfc9d29dd | |
parent | 3cd2d150036b7a3d5286bae02e7c45e4f689c4d5 (diff) | |
download | mate-applets-7551de5b32663e76df12669ef9a41a3e61160a44.tar.bz2 mate-applets-7551de5b32663e76df12669ef9a41a3e61160a44.tar.xz |
stickynotes: replace deprecated gdk_error_trap_push/pop functions
and renaming gdk_display to xdisplay var to match
GDK_DISPLAY_XDISPLAY, what it really is.
-rw-r--r-- | stickynotes/util.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/stickynotes/util.c b/stickynotes/util.c index 0af1fc9b..929c877f 100644 --- a/stickynotes/util.c +++ b/stickynotes/util.c @@ -86,20 +86,22 @@ xstuff_get_current_workspace (GtkWindow *window) int format; int result; int retval; - Display *gdk_display; + GdkDisplay *gdk_display; + Display *xdisplay; root_window = GDK_WINDOW_XID (gtk_widget_get_window (GTK_WIDGET (window))); - gdk_display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); + gdk_display = gdk_display_get_default (); + xdisplay = GDK_DISPLAY_XDISPLAY (gdk_display); - gdk_error_trap_push (); - result = XGetWindowProperty (gdk_display, + gdk_x11_display_error_trap_push (gdk_display); + result = XGetWindowProperty (xdisplay, root_window, xstuff_atom_get ("_NET_CURRENT_DESKTOP"), 0, G_MAXLONG, False, XA_CARDINAL, &type, &format, &nitems, &bytes_after, (gpointer) &num); - if (gdk_error_trap_pop () || result != Success) + if (gdk_x11_display_error_trap_pop (gdk_display) || result != Success) return -1; if (type != XA_CARDINAL) { |