[PATCH weston] xwayland: Stack windows on top when activating them

Giulio Camuffo giuliocamuffo at gmail.com
Sun Mar 29 02:45:30 PDT 2015


I can't really comment on the code aside that it looks fine for a not
X-savy eye, but it works fine with the xwayland change to remove the
xwl_xy_to_window thingy.

2015-03-22 19:14 GMT+02:00 Jasper St. Pierre <jstpierre at mecheye.net>:
> Now that we've removed the XYToWindow handler in Xwayland, we actually
> have to stack windows properly. This stacks windows on top when
> activating them.
>
> Note that for a fully robust Xwayland implementation, we'll need a
> complete stack tracker implementation, unfortunately.
> ---
>  xwayland/window-manager.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c
> index 59cf39a..8698744 100644
> --- a/xwayland/window-manager.c
> +++ b/xwayland/window-manager.c
> @@ -708,6 +708,8 @@ weston_wm_window_activate(struct wl_listener *listener, void *data)
>         }
>
>         if (window) {
> +               uint32_t values[1];
> +
>                 if (window->override_redirect)
>                         return;
>
> @@ -724,6 +726,10 @@ weston_wm_window_activate(struct wl_listener *listener, void *data)
>
>                 xcb_set_input_focus (wm->conn, XCB_INPUT_FOCUS_POINTER_ROOT,
>                                      window->id, XCB_TIME_CURRENT_TIME);
> +
> +               values[0] = XCB_STACK_MODE_ABOVE;
> +               xcb_configure_window (wm->conn, window->frame_id,

Minor nitpick: there's a space between xcb_configure_window and the '('.

> +                                     XCB_CONFIG_WINDOW_STACK_MODE, values);
>         } else {
>                 xcb_set_input_focus (wm->conn,
>                                      XCB_INPUT_FOCUS_POINTER_ROOT,
> --
> 2.1.0
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list