aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Kirill Primak <vyivel@eclair.cafe>2023-03-09 13:02:13 +0300
committerLibravatar Simon Ser <contact@emersion.fr>2023-06-02 20:11:42 +0200
commit72881b5d120442e3a6f9c5b022c8d9cc05cb27c0 (patch)
treeafe21d55061ca28b38b3c805713a857212a64755
parentFix layer old damage not being offset by the monitor layout coords (diff)
downloadsway-72881b5d120442e3a6f9c5b022c8d9cc05cb27c0.tar.gz
sway-72881b5d120442e3a6f9c5b022c8d9cc05cb27c0.tar.zst
sway-72881b5d120442e3a6f9c5b022c8d9cc05cb27c0.zip
xwayland: don't rely on event source being data
This pattern is being slowly removed from wlroots.
-rw-r--r--sway/desktop/xwayland.c8
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
127static void unmanaged_handle_request_activate(struct wl_listener *listener, void *data) { 127static 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) {
495static void handle_map(struct wl_listener *listener, void *data) { 497static 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) {
515static void handle_override_redirect(struct wl_listener *listener, void *data) { 517static 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) {