From cf5aca5a0db845367570e4bc292e3bb730be8fcc Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Tue, 21 Jun 2022 09:09:23 -0500 Subject: [PATCH] xwm: Generate more synthetic ConfigureNotify events Many programs use this information to help position pop-ups properly, and without it funny things happen. For example, nedit and tkinter apps will position their menus incorrectly either all the time or after an initial window move, firefox may position right-click pop-ups incorrectly depending on other internal state. https://tronche.com/gui/x/icccm/sec-4.html#s-4.1.5 has much detail on how this should work, and the Advice to Implementors section shows that common client practices will break in the face of our miserly handling of ConfigureNotify events. Instead of trying to send it only for configure requests received when a client is in a fullscreen state, send them much more frequently. Fixes #619 Signed-off-by: Derek Foreman --- xwayland/window-manager.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c index a0a61912..7889f871 100644 --- a/xwayland/window-manager.c +++ b/xwayland/window-manager.c @@ -814,6 +814,7 @@ weston_wm_handle_configure_request(struct weston_wm *wm, xcb_generic_event_t *ev weston_wm_configure_window(wm, window->id, mask, values); weston_wm_window_configure_frame(window); + weston_wm_window_send_configure_notify(window); weston_wm_window_schedule_repaint(window); } @@ -1156,6 +1157,7 @@ weston_wm_window_create_frame(struct weston_wm_window *window) width, height); hash_table_insert(wm->window_hash, window->frame_id, window); + weston_wm_window_send_configure_notify(window); } /* @@ -2713,6 +2715,7 @@ weston_wm_window_configure(void *data) values); weston_wm_window_configure_frame(window); + weston_wm_window_send_configure_notify(window); weston_wm_window_schedule_repaint(window); } @@ -2802,6 +2805,7 @@ send_position(struct weston_surface *surface, int32_t x, int32_t y) mask = XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y; weston_wm_configure_window(wm, window->frame_id, mask, values); + weston_wm_window_send_configure_notify(window); xcb_flush(wm->conn); } }