mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-10-14 22:49:58 +00:00
xwm: Bring back synthetic events and handle synthetic unmap notify as per ICCCM
This commit is contained in:
parent
e244cb03f7
commit
f197e9f7a3
|
@ -540,6 +540,14 @@ weston_wm_handle_unmap_notify(struct weston_wm *wm, xcb_generic_event_t *event)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
window = hash_table_lookup(wm->window_hash, unmap_notify->window);
|
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. */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (window->repaint_source)
|
if (window->repaint_source)
|
||||||
wl_event_source_remove(window->repaint_source);
|
wl_event_source_remove(window->repaint_source);
|
||||||
if (window->cairo_surface)
|
if (window->cairo_surface)
|
||||||
|
@ -882,7 +890,7 @@ weston_wm_handle_event(int fd, uint32_t mask, void *data)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (event->response_type) {
|
switch (event->response_type & ~0x80) {
|
||||||
case XCB_BUTTON_PRESS:
|
case XCB_BUTTON_PRESS:
|
||||||
case XCB_BUTTON_RELEASE:
|
case XCB_BUTTON_RELEASE:
|
||||||
weston_wm_handle_button(wm, event);
|
weston_wm_handle_button(wm, event);
|
||||||
|
|
Loading…
Reference in a new issue