From 153f37bdf57c61e7fb09162a6791afe8b9b4d0ef Mon Sep 17 00:00:00 2001 From: emersion Date: Wed, 18 Jul 2018 18:51:03 +0100 Subject: xwayland: handle override_redirect flag changes The override_redirect flag can change on configure notify and on map notify. This adds an event to know when it changes. This removes wlr_xwayland_surface_is_unmanaged which was wrongly using the window type to decide whether the view should be unmanaged. A similar patch was proposed to Weston, but has never been merged upstream [1]. [1]: https://patchwork.freedesktop.org/patch/211161/ --- rootston/seat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rootston') diff --git a/rootston/seat.c b/rootston/seat.c index 892faaa0..cae548d3 100644 --- a/rootston/seat.c +++ b/rootston/seat.c @@ -127,13 +127,13 @@ static void handle_tablet_tool_position(struct roots_cursor *cursor, struct wlr_surface *surface = desktop_surface_at(desktop, cursor->cursor->x, cursor->cursor->y, &sx, &sy, &view); struct roots_tablet_tool *roots_tool = tool->data; - + if (!surface) { wlr_send_tablet_v2_tablet_tool_proximity_out(roots_tool->tablet_v2_tool); /* XXX: TODO: Fallback pointer semantics */ return; } - + if (!wlr_surface_accepts_tablet_v2(tablet->tablet_v2, surface)) { wlr_send_tablet_v2_tablet_tool_proximity_out(roots_tool->tablet_v2_tool); /* XXX: TODO: Fallback pointer semantics */ @@ -217,7 +217,7 @@ static void handle_tool_tip(struct wl_listener *listener, void *data) { static void handle_tablet_tool_destroy(struct wl_listener *listener, void *data) { struct roots_tablet_tool *tool = wl_container_of(listener, tool, tool_destroy); - + wl_list_remove(&tool->link); wl_list_remove(&tool->tool_link); @@ -1124,7 +1124,7 @@ void roots_seat_set_focus(struct roots_seat *seat, struct roots_view *view) { #ifdef WLR_HAS_XWAYLAND if (view && view->type == ROOTS_XWAYLAND_VIEW && - wlr_xwayland_surface_is_unmanaged(view->xwayland_surface)) { + view->xwayland_surface->override_redirect) { return; } #endif -- cgit v1.2.3