https://bugs.documentfoundation.org/show_bug.cgi?id=90155
--- Comment #3 from Michael Stapelberg <[email protected]> --- I’m the main developer of i3 and spent a bit of time debugging this issue. By using the following patch for i3, you can reliable reproduce the problem: diff --git i/src/handlers.c w/src/handlers.c index 0cd397f..b96433b 100644 --- i/src/handlers.c +++ w/src/handlers.c @@ -458,6 +458,7 @@ static void handle_screen_change(xcb_generic_event_t *e) { */ static void handle_unmap_notify_event(xcb_unmap_notify_event_t *event) { DLOG("UnmapNotify for 0x%08x (received from 0x%08x), serial %d\n", event->window, event->event, event->sequence); + sleep(1); xcb_get_input_focus_cookie_t cookie; Con *con = con_by_window_id(event->window); if (con == NULL) { Here are a couple of interesting observations: 1) https://bugs.documentfoundation.org/attachment.cgi?id=114243 shows libreoffice mapping a window and then unmapping it, without waiting for the window manager to actually map the window. I.e., libreoffice is not waiting for the MapNotify event. 2) https://bugs.documentfoundation.org/attachment.cgi?id=114244 shows that libreoffice is then sending a MapRequest for that same window (see the MapWindow w_56 call in the very last buffer), without having waited for the window manager to confirm the previous UnmapWindow by setting the WM_STATE to WithDrawn. I think both of this is unsafe and prone to race-conditions at the very least. If I read ICCCM section 4.1.4 correctly (see http://tronche.com/gui/x/icccm/sec-4.html#s-4.1.4), what libreoffice does in (2) is even a spec violation: > When a client withdraws a window, the window manager will then update or > remove the WM_STATE property as described in section 4.1.3.1. Clients that > want to re-use a client window (e.g. by mapping it again or reparenting it > elsewhere) after withdrawing it must wait for the withdrawal to be complete > before proceeding. The preferred method for doing this is for clients to wait > for the window manager to update or remove the WM_STATE property. Here are my suggestions on how to fix this issue: 1) For showing the tooltip window, ideally you would never need to call XWithdrawWindow() at all, and just map it once at the final position. 2) If that’s infeasible for some reason, please wait for the MapNotify event before Unmapping windows. 3) Regardless of suggestion (1) and (2), never re-use a window before you got the WM_STATE change from the window manager. Thanks. -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ Libreoffice-bugs mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
