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 <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2022-06-21 09:09:23 -05:00 committed by Pekka Paalanen
parent ea9a01f2e3
commit cf5aca5a0d

View File

@ -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);
}
}