summaryrefslogtreecommitdiff
path: root/openbox
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2008-01-15 22:51:04 -0500
committerDana Jansens <danakj@orodu.net>2008-01-15 22:51:04 -0500
commitf9f32d9fbaae9ca415603bb61b36393994afbd16 (patch)
treef7c2f8a7280cdacae1d8cf30ce2583aabb7c96d1 /openbox
parentd5c824cfd4ec84155772a5c482b0ffdc99dc1ab9 (diff)
cant consistently tell if we should use WM_DESTROY after the first time they try close a window.. so just kill when "not responding" is showing
Diffstat (limited to 'openbox')
-rw-r--r--openbox/client.c10
-rw-r--r--openbox/client.h2
-rw-r--r--openbox/ping.c5
3 files changed, 6 insertions, 11 deletions
diff --git a/openbox/client.c b/openbox/client.c
index 1f7ce97b..2f8f58a9 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -3212,10 +3212,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,14 +3228,12 @@ 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 {
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;
}
}
diff --git a/openbox/client.h b/openbox/client.h
index b9dd9e5a..0efeb197 100644
--- a/openbox/client.h
+++ b/openbox/client.h
@@ -231,8 +231,6 @@ struct _ObClient
/*! Indicates if the client is trying to close but has stopped responding
to pings */
gboolean not_responding;
- /*! We tried to close the window with a DESTROY message */
- gboolean close_tried_destroy;
/*! We tried to close the window with a SIGTERM */
gboolean close_tried_term;
diff --git a/openbox/ping.c b/openbox/ping.c
index 874d020c..531b8938 100644
--- a/openbox/ping.c
+++ b/openbox/ping.c
@@ -87,7 +87,8 @@ void ping_got_pong(Time timestamp)
for (it = ping_targets; it != NULL; it = g_slist_next(it)) {
t = it->data;
if (t->sent == timestamp) {
- /*ob_debug("Got PONG with timestamp %lu\n", timestamp);*/
+ ob_debug("Got PONG with timestamp %lu for %s\n", timestamp,
+ t->client->title);
if (t->waiting > PING_TIMEOUT_WARN) {
/* we had notified that they weren't responding, so now we
need to notify that they are again */
@@ -106,7 +107,7 @@ void ping_got_pong(Time timestamp)
static void ping_send(ObPingTarget *t)
{
t->sent = event_get_server_time();
- /*ob_debug("PINGing client 0x%x at %lu\n", t->client->window, t->sent);*/
+ ob_debug("PINGing client %s at %lu\n", t->client->title, t->sent);
PROP_MSG_TO(t->client->window, t->client->window, wm_protocols,
prop_atoms.net_wm_ping, t->sent, t->client->window, 0, 0,
NoEventMask);