diff options
author | raveit65 <[email protected]> | 2018-05-05 18:04:41 +0200 |
---|---|---|
committer | lukefromdc <[email protected]> | 2018-05-07 02:36:35 -0400 |
commit | fc70465e4605d81bab8c5dfb83891efff46bf1f2 (patch) | |
tree | 3ce0ada3e74459a683e6ebda3e05bde2018d36af /src | |
parent | 2392093542a0819ad186885b2b0969870dfcafe0 (diff) | |
download | caja-fc70465e4605d81bab8c5dfb83891efff46bf1f2.tar.bz2 caja-fc70465e4605d81bab8c5dfb83891efff46bf1f2.tar.xz |
fm-desktop-icon-view: replace deprecated gdk_error_trap_push/pop functions
Diffstat (limited to 'src')
-rw-r--r-- | src/file-manager/fm-desktop-icon-view.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/file-manager/fm-desktop-icon-view.c b/src/file-manager/fm-desktop-icon-view.c index 54e5d265..f6b563c3 100644 --- a/src/file-manager/fm-desktop-icon-view.c +++ b/src/file-manager/fm-desktop-icon-view.c @@ -149,6 +149,7 @@ static void net_workarea_changed (FMDesktopIconView *icon_view, GdkWindow *window) { + GdkDisplay *display; long *nworkareas = NULL; long *workareas = NULL; GdkAtom type_returned; @@ -165,7 +166,8 @@ net_workarea_changed (FMDesktopIconView *icon_view, * workareas array is going to be (each desktop will have four * elements in the workareas array describing * x,y,width,height) */ - gdk_error_trap_push (); + display = gtk_widget_get_display (GTK_WIDGET (icon_view)); + gdk_x11_display_error_trap_push (display); if (!gdk_property_get (window, gdk_atom_intern ("_NET_NUMBER_OF_DESKTOPS", FALSE), gdk_x11_xatom_to_atom (XA_CARDINAL), @@ -177,7 +179,7 @@ net_workarea_changed (FMDesktopIconView *icon_view, { g_warning("Can not calculate _NET_NUMBER_OF_DESKTOPS"); } - if (gdk_error_trap_pop() + if (gdk_x11_display_error_trap_pop (display) || nworkareas == NULL || type_returned != gdk_x11_xatom_to_atom (XA_CARDINAL) || format_returned != 32) @@ -193,7 +195,7 @@ net_workarea_changed (FMDesktopIconView *icon_view, * request does not correspond to the number of bytes you get * back, and is the reason for the workaround below. */ - gdk_error_trap_push (); + gdk_x11_display_error_trap_push (display); if (nworkareas == NULL || (*nworkareas < 1) || !gdk_property_get (window, gdk_atom_intern ("_NET_WORKAREA", FALSE), @@ -208,7 +210,7 @@ net_workarea_changed (FMDesktopIconView *icon_view, workareas = NULL; } - if (gdk_error_trap_pop () + if (gdk_x11_display_error_trap_pop (display) || workareas == NULL || type_returned != gdk_x11_xatom_to_atom (XA_CARDINAL) || ((*nworkareas) * 4 * sizeof(long)) != length_returned |