diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-07-23 20:55:19 -0400 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2008-01-20 01:36:54 -0500 |
| commit | a2f5a826a1ed79102cd59a9ef17724fb90afe86b (patch) | |
| tree | 37f4ed0e023b30fcef567b259b79d3f4b7b8e0f5 /openbox/screen.c | |
| parent | 452627a51ce38229533dfe5d8eeb877b0918d02c (diff) | |
move the xerror handling into the libobt
Diffstat (limited to 'openbox/screen.c')
| -rw-r--r-- | openbox/screen.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/openbox/screen.c b/openbox/screen.c index e008ffe5..d287c9fc 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -20,7 +20,6 @@ #include "debug.h" #include "openbox.h" #include "dock.h" -#include "xerror.h" #include "prop.h" #include "grab.h" #include "startupnotify.h" @@ -37,6 +36,7 @@ #include "extensions.h" #include "render/render.h" #include "gettext.h" +#include "obt/display.h" #include <X11/Xlib.h> #ifdef HAVE_UNISTD_H @@ -103,15 +103,14 @@ static gboolean replace_wm(void) ob_screen); return FALSE; } - xerror_set_ignore(TRUE); - xerror_occured = FALSE; + obt_display_ignore_errors(ob_display, TRUE); /* We want to find out when the current selection owner dies */ XSelectInput(ob_display, current_wm_sn_owner, StructureNotifyMask); XSync(ob_display, FALSE); - xerror_set_ignore(FALSE); - if (xerror_occured) + obt_display_ignore_errors(ob_display, FALSE); + if (obt_display_error_occured()) current_wm_sn_owner = None; } @@ -181,12 +180,11 @@ gboolean screen_annex(void) return FALSE; } - xerror_set_ignore(TRUE); - xerror_occured = FALSE; + obt_display_ignore_errors(ob_display, TRUE); XSelectInput(ob_display, RootWindow(ob_display, ob_screen), ROOT_EVENTMASK); - xerror_set_ignore(FALSE); - if (xerror_occured) { + obt_display_ignore_errors(ob_display, FALSE); + if (obt_display_error_occured()) { g_message(_("A window manager is already running on screen %d"), ob_screen); @@ -1246,12 +1244,12 @@ void screen_install_colormap(ObClient *client, gboolean install) else XUninstallColormap(RrDisplay(ob_rr_inst), RrColormap(ob_rr_inst)); } else { - xerror_set_ignore(TRUE); + obt_display_ignore_errors(ob_display, TRUE); if (install) XInstallColormap(RrDisplay(ob_rr_inst), client->colormap); else XUninstallColormap(RrDisplay(ob_rr_inst), client->colormap); - xerror_set_ignore(FALSE); + obt_display_ignore_errors(ob_display, FALSE); } } |
