[PATCH weston v2 13/24] xwm: debug changes to override-redirect flag
Quentin Glidic
sardemff7+wayland at sardemff7.net
Sun Jan 15 13:54:08 UTC 2017
On 21/12/2016 15:40, Pekka Paalanen wrote:
> From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
>
> For every event we handle and that delivers the override-redirect flag,
> print it to debug log.
>
> Add a comment to one code path explaining when it gets hit, because it
> is unobvious. It also serves as a reminder that we do not handle changes
> to the OR flag after Window creation.
>
> Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
Documenting stuff is good:
Reviewed-by: Quentin Glidic <sardemff7+git at sardemff7.net>
Thanks,
> ---
> xwayland/window-manager.c | 18 +++++++++++++-----
> 1 file changed, 13 insertions(+), 5 deletions(-)
>
> diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c
> index fb83795..0a6417c 100644
> --- a/xwayland/window-manager.c
> +++ b/xwayland/window-manager.c
> @@ -741,10 +741,11 @@ weston_wm_handle_configure_notify(struct weston_wm *wm, xcb_generic_event_t *eve
> (xcb_configure_notify_event_t *) event;
> struct weston_wm_window *window;
>
> - wm_log("XCB_CONFIGURE_NOTIFY (window %d) %d,%d @ %dx%d\n",
> + wm_log("XCB_CONFIGURE_NOTIFY (window %d) %d,%d @ %dx%d%s\n",
> configure_notify->window,
> configure_notify->x, configure_notify->y,
> - configure_notify->width, configure_notify->height);
> + configure_notify->width, configure_notify->height,
> + configure_notify->override_redirect ? ", override" : "");
>
> if (!wm_lookup_window(wm, configure_notify->window, &window))
> return;
> @@ -1069,7 +1070,8 @@ weston_wm_handle_map_notify(struct weston_wm *wm, xcb_generic_event_t *event)
> return;
> }
>
> - wm_log("XCB_MAP_NOTIFY (window %d)\n", map_notify->window);
> + wm_log("XCB_MAP_NOTIFY (window %d%s)\n", map_notify->window,
> + map_notify->override_redirect ? ", override" : "");
> }
>
> static void
> @@ -1212,6 +1214,11 @@ weston_wm_window_schedule_repaint(struct weston_wm_window *window)
>
> if (window->frame_id == XCB_WINDOW_NONE) {
> if (window->surface != NULL) {
> + /* Override-redirect windows go through here, but we
> + * cannot assert(window->override_redirect); because
> + * we do not deal with changing OR flag yet.
> + * XXX: handle OR flag changes in message handlers
> + */
> weston_wm_window_get_frame_size(window, &width, &height);
> pixman_region32_fini(&window->surface->pending.opaque);
> if (window->has_alpha) {
> @@ -1386,10 +1393,11 @@ weston_wm_handle_reparent_notify(struct weston_wm *wm, xcb_generic_event_t *even
> (xcb_reparent_notify_event_t *) event;
> struct weston_wm_window *window;
>
> - wm_log("XCB_REPARENT_NOTIFY (window %d, parent %d, event %d)\n",
> + wm_log("XCB_REPARENT_NOTIFY (window %d, parent %d, event %d%s)\n",
> reparent_notify->window,
> reparent_notify->parent,
> - reparent_notify->event);
> + reparent_notify->event,
> + reparent_notify->override_redirect ? ", override" : "");
>
> if (reparent_notify->parent == wm->screen->root) {
> weston_wm_window_create(wm, reparent_notify->window, 10, 10,
>
--
Quentin “Sardem FF7” Glidic
More information about the wayland-devel
mailing list