diff options
-rw-r--r-- | sway/desktop/xwayland.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index 9c29f66b..bcefc4fd 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c | |||
@@ -125,7 +125,9 @@ static void unmanaged_handle_unmap(struct wl_listener *listener, void *data) { | |||
125 | } | 125 | } |
126 | 126 | ||
127 | static void unmanaged_handle_request_activate(struct wl_listener *listener, void *data) { | 127 | static void unmanaged_handle_request_activate(struct wl_listener *listener, void *data) { |
128 | struct wlr_xwayland_surface *xsurface = data; | 128 | struct sway_xwayland_unmanaged *surface = |
129 | wl_container_of(listener, surface, request_activate); | ||
130 | struct wlr_xwayland_surface *xsurface = surface->wlr_xwayland_surface; | ||
129 | if (!xsurface->mapped) { | 131 | if (!xsurface->mapped) { |
130 | return; | 132 | return; |
131 | } | 133 | } |
@@ -495,8 +497,8 @@ static void handle_unmap(struct wl_listener *listener, void *data) { | |||
495 | static void handle_map(struct wl_listener *listener, void *data) { | 497 | static void handle_map(struct wl_listener *listener, void *data) { |
496 | struct sway_xwayland_view *xwayland_view = | 498 | struct sway_xwayland_view *xwayland_view = |
497 | wl_container_of(listener, xwayland_view, map); | 499 | wl_container_of(listener, xwayland_view, map); |
498 | struct wlr_xwayland_surface *xsurface = data; | ||
499 | struct sway_view *view = &xwayland_view->view; | 500 | struct sway_view *view = &xwayland_view->view; |
501 | struct wlr_xwayland_surface *xsurface = view->wlr_xwayland_surface; | ||
500 | 502 | ||
501 | view->natural_width = xsurface->width; | 503 | view->natural_width = xsurface->width; |
502 | view->natural_height = xsurface->height; | 504 | view->natural_height = xsurface->height; |
@@ -515,8 +517,8 @@ static void handle_map(struct wl_listener *listener, void *data) { | |||
515 | static void handle_override_redirect(struct wl_listener *listener, void *data) { | 517 | static void handle_override_redirect(struct wl_listener *listener, void *data) { |
516 | struct sway_xwayland_view *xwayland_view = | 518 | struct sway_xwayland_view *xwayland_view = |
517 | wl_container_of(listener, xwayland_view, override_redirect); | 519 | wl_container_of(listener, xwayland_view, override_redirect); |
518 | struct wlr_xwayland_surface *xsurface = data; | ||
519 | struct sway_view *view = &xwayland_view->view; | 520 | struct sway_view *view = &xwayland_view->view; |
521 | struct wlr_xwayland_surface *xsurface = view->wlr_xwayland_surface; | ||
520 | 522 | ||
521 | bool mapped = xsurface->mapped; | 523 | bool mapped = xsurface->mapped; |
522 | if (mapped) { | 524 | if (mapped) { |