diff options
author | Olivier Fourdan <fourdan@xfce.org> | 2018-04-04 22:14:51 +0200 |
---|---|---|
committer | Olivier Fourdan <fourdan@xfce.org> | 2018-04-05 11:48:01 +0200 |
commit | e63cdb19cfa98bac6e8001a22b0a69445abd9a6b (patch) | |
tree | cee7c9d6b6985bba23a52beabc1fe7b8c3235102 /src/misc.c | |
parent | 84926d2868b19c60831b319249226e1448ff0227 (diff) | |
download | xfwm4-e63cdb19cfa98bac6e8001a22b0a69445abd9a6b.tar.gz |
Use convenient display functions
Diffstat (limited to 'src/misc.c')
-rw-r--r-- | src/misc.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/misc.c b/src/misc.c index 94a606038..3685916d9 100644 --- a/src/misc.c +++ b/src/misc.c @@ -152,21 +152,14 @@ checkWindowOnRoot(ScreenInfo *screen_info, Window w) display_info = screen_info->display_info; wins = NULL; -#if GTK_CHECK_VERSION(3, 22, 0) - gdk_x11_display_error_trap_push (display_info->gdisplay); -#else - gdk_error_trap_push (); -#endif + myDisplayErrorTrapPush (display_info); test = XQueryTree(display_info->dpy, w, &dummy_root, &parent, &wins, &count); if (wins) { XFree (wins); } -#if GTK_CHECK_VERSION(3, 22, 0) - ret = gdk_x11_display_error_trap_pop (display_info->gdisplay); -#else - ret = gdk_error_trap_pop (); -#endif + ret = myDisplayErrorTrapPop (display_info); + return ((ret == 0) && (test != 0) && (dummy_root == parent)); } |