diff options
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | matchbox/core/mb-wm-client.c | 23 |
2 files changed, 31 insertions, 2 deletions
@@ -1,3 +1,13 @@ +2008-07-30 Robert Bragg <bob@o-hand.com> + + * matchbox/core/mb-wm-client.c: + Adds a check in mb_wm_client_ping_start that the client supports + the NET_WM_PING protocol. + + Adds a verbose comment in mb_wm_client_deliver_delete about not being + able check for failures of WM_DELETE messages. (Since I recently had + a problem in a derivative WM that was attempting just that.) + 2008-07-29 Robert Bragg <bob@o-hand.com> * matchbox/theme-engines/mb-wm-theme-png.c: diff --git a/matchbox/core/mb-wm-client.c b/matchbox/core/mb-wm-client.c index a08e775..092803a 100644 --- a/matchbox/core/mb-wm-client.c +++ b/matchbox/core/mb-wm-client.c @@ -740,6 +740,10 @@ mb_wm_client_ping_timeout_cb (void * userdata) { MBWindowManagerClient * client = userdata; + /* TODO - support displaying a dialog at this point, notifying the user of + * the unresponsive client so they have a chance to abort its shutdown. + */ + mb_wm_client_shutdown (client); return False; } @@ -747,8 +751,12 @@ mb_wm_client_ping_timeout_cb (void * userdata) void mb_wm_client_ping_start (MBWindowManagerClient *client) { - MBWindowManager * wm = client->wmref; - MBWMMainContext * ctx = wm->main_ctx; + MBWindowManager * wm = client->wmref; + MBWMMainContext * ctx = wm->main_ctx; + MBWMClientWindowProtos protos = client->window->protos; + + if (!(protos & MBWMClientWindowProtosPing)) + return; if (client->ping_cb_id) return; @@ -807,6 +815,17 @@ mb_wm_client_deliver_delete (MBWindowManagerClient *client) mb_wm_client_deliver_wm_protocol (client, wm->atoms[MBWM_ATOM_WM_DELETE_WINDOW]); + /* NB: It is not appropriate (or even possible) to try and + * determine a failure to respond to a WM_DELETE, since it + * would be reasonable for a client to put up a confirmation + * dialog in response to a WM_DELETE and do nothing if the + * user cancels the operation (because it was an accident) + * + * The NET_WM_PING protocol is the right way to determine an + * unresponsive client and we always send a ping (if the + * client supports the protocol) when issuing a WM_DELETE. + */ + mb_wm_client_ping_start (client); } else |