diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2012-05-31 10:33:43 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-05-31 10:33:43 -0400 |
commit | d64bdf4755005854fc59922ed0e4cbf12ebfbdac (patch) | |
tree | 7957d24618850ac89b9c1a7f1c5f3aadad45b34f | |
parent | f7a69642a9993e17fa045b12cab55b0493a7f6db (diff) |
xwm: Just ignore the synthetic unmap_notify
As per ICCCM 4.1.4 we're supposed to withdraw the window when we see
the real unmap or the synthetic unmap, whichever comes first. The
synthetic unmap may come after the window has been destroyed, so let's
just only handle the real unmap.
-rw-r--r-- | src/xwayland/window-manager.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/xwayland/window-manager.c b/src/xwayland/window-manager.c index 9444132..b8be54c 100644 --- a/src/xwayland/window-manager.c +++ b/src/xwayland/window-manager.c @@ -562,15 +562,12 @@ weston_wm_handle_unmap_notify(struct weston_wm *wm, xcb_generic_event_t *event) if (our_resource(wm, unmap_notify->window)) return; - window = hash_table_lookup(wm->window_hash, unmap_notify->window); - if (window->frame_id == XCB_WINDOW_NONE) { - /* We already withdrew this window on the real unmap - * notify and this is the synthetic unmap notify from - * the client, or the other way around (ICCCM 4.1.4). - * Either way, we're already done so just return. */ + if (unmap_notify->response_type & 0x80) + /* We just ignore the ICCCM 4.1.4 synthetic unmap notify + * as it may come in after we've destroyed the window. */ return; - } + window = hash_table_lookup(wm->window_hash, unmap_notify->window); if (window->repaint_source) wl_event_source_remove(window->repaint_source); if (window->cairo_surface) |