X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Fclient.c;h=6a6ec2bded867f0516fbbae97bbbde527f31ad2a;hb=299687110d478a4928932f72031c345b27a01840;hp=1f7ce97bcc34389ff9239294c1a248cc4835c231;hpb=d5c824cfd4ec84155772a5c482b0ffdc99dc1ab9;p=chaz%2Fopenbox diff --git a/openbox/client.c b/openbox/client.c index 1f7ce97b..6a6ec2bd 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -24,6 +24,7 @@ #include "xerror.h" #include "screen.h" #include "moveresize.h" +#include "ping.h" #include "place.h" #include "prop.h" #include "extensions.h" @@ -79,6 +80,10 @@ static void client_get_state(ObClient *self); static void client_get_shaped(ObClient *self); static void client_get_mwm_hints(ObClient *self); static void client_get_colormap(ObClient *self); +static void client_set_desktop_recursive(ObClient *self, + guint target, + gboolean donthide, + gboolean dontraise); static void client_change_allowed_actions(ObClient *self); static void client_change_state(ObClient *self); static void client_change_wm_state(ObClient *self); @@ -1551,7 +1556,7 @@ void client_update_sync_request_counter(ObClient *self) } #endif -void client_get_colormap(ObClient *self) +static void client_get_colormap(ObClient *self) { XWindowAttributes wa; @@ -3212,10 +3217,8 @@ static void client_ping_event(ObClient *self, gboolean dead) client_update_title(self); if (!dead) { - /* the window has started responding again, so don't kill it the first - time they click on close, even if it stops responding again in the - future */ - self->close_tried_destroy = FALSE; + /* try kill it nicely the first time again, if it started responding + at some point */ self->close_tried_term = FALSE; } } @@ -3230,15 +3233,13 @@ void client_close(ObClient *self) /* don't use client_kill(), we should only kill based on PID in response to a lack of PING replies */ XKillClient(ob_display, self->window); - else if (self->not_responding && self->close_tried_destroy) + else if (self->not_responding) client_kill(self); - else { + else + /* request the client to close with WM_DELETE_WINDOW */ PROP_MSG_TO(self->window, self->window, wm_protocols, prop_atoms.wm_delete_window, event_curtime, 0, 0, 0, NoEventMask); - self->close_tried_destroy = TRUE; - self->close_tried_term = FALSE; - } } void client_kill(ObClient *self) @@ -3280,10 +3281,10 @@ void client_hilite(ObClient *self, gboolean hilite) } } -void client_set_desktop_recursive(ObClient *self, - guint target, - gboolean donthide, - gboolean dontraise) +static void client_set_desktop_recursive(ObClient *self, + guint target, + gboolean donthide, + gboolean dontraise) { guint old; GSList *it;