X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fclient.c;h=20ccfe3d22cb1b399f18616cd5318707447b858b;hb=32a92abf7578ea93d85741b7c89a0958082aa9ee;hp=6a6ec2bded867f0516fbbae97bbbde527f31ad2a;hpb=0be98fee4743c795b06aa23881b82eff5bab3ef6;p=chaz%2Fopenbox diff --git a/openbox/client.c b/openbox/client.c index 6a6ec2bd..20ccfe3d 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -21,13 +21,11 @@ #include "debug.h" #include "startupnotify.h" #include "dock.h" -#include "xerror.h" #include "screen.h" #include "moveresize.h" #include "ping.h" #include "place.h" #include "prop.h" -#include "extensions.h" #include "frame.h" #include "session.h" #include "event.h" @@ -42,6 +40,7 @@ #include "mouse.h" #include "render/render.h" #include "gettext.h" +#include "obt/display.h" #ifdef HAVE_UNISTD_H # include @@ -609,7 +608,10 @@ void client_manage(Window window) /* watch for when the application stops responding. only do this for normal windows, i.e. windows which have titlebars and close buttons - and things like that */ + and things like that. + we don't need to stop pinging on unmanage, because it will be handled + automatically by the destroy callback! + */ if (self->ping && client_normal(self)) ping_start(self, client_ping_event); @@ -694,10 +696,6 @@ void client_unmanage(ObClient *self) /* remove the window from our save set */ XChangeSaveSet(ob_display, self->window, SetModeDelete); - /* stop pinging the window */ - if (self->ping && client_normal(self)) - ping_stop(self); - /* update the focus lists */ focus_order_remove(self); if (client_focused(self)) { @@ -1263,7 +1261,7 @@ static void client_get_shaped(ObClient *self) { self->shaped = FALSE; #ifdef SHAPE - if (extensions_shape) { + if (obt_display_extension_shape) { gint foo; guint ufoo; gint s; @@ -2125,7 +2123,7 @@ void client_update_icons(ObClient *self) if (hints->flags & IconPixmapHint) { self->nicons = 1; self->icons = g_new(ObClientIcon, self->nicons); - xerror_set_ignore(TRUE); + obt_display_ignore_errors(ob_display, TRUE); if (!RrPixmapToRGBA(ob_rr_inst, hints->icon_pixmap, (hints->flags & IconMaskHint ? @@ -2137,7 +2135,7 @@ void client_update_icons(ObClient *self) g_free(self->icons); self->nicons = 0; } - xerror_set_ignore(FALSE); + obt_display_ignore_errors(ob_display, FALSE); } XFree(hints); } @@ -3613,8 +3611,7 @@ gboolean client_focus(ObClient *self) */ event_cancel_all_key_grabs(); - xerror_set_ignore(TRUE); - xerror_occured = FALSE; + obt_display_ignore_errors(ob_display, TRUE); if (self->can_focus) { /* This can cause a BadMatch error with CurrentTime, or if an app @@ -3638,10 +3635,11 @@ gboolean client_focus(ObClient *self) XSendEvent(ob_display, self->window, FALSE, NoEventMask, &ce); } - xerror_set_ignore(FALSE); + obt_display_ignore_errors(ob_display, FALSE); - ob_debug_type(OB_DEBUG_FOCUS, "Error focusing? %d\n", xerror_occured); - return !xerror_occured; + ob_debug_type(OB_DEBUG_FOCUS, "Error focusing? %d\n", + obt_display_error_occured); + return !obt_display_error_occured; } static void client_present(ObClient *self, gboolean here, gboolean raise,