diff options
-rw-r--r-- | include/sway/tree/view.h | 4 | ||||
-rw-r--r-- | sway/desktop/xwayland.c | 19 |
2 files changed, 12 insertions, 11 deletions
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h index e5f53f4e..54f6d90e 100644 --- a/include/sway/tree/view.h +++ b/include/sway/tree/view.h | |||
@@ -28,8 +28,8 @@ struct sway_xwayland_surface { | |||
28 | struct wl_listener request_resize; | 28 | struct wl_listener request_resize; |
29 | struct wl_listener request_maximize; | 29 | struct wl_listener request_maximize; |
30 | struct wl_listener request_configure; | 30 | struct wl_listener request_configure; |
31 | struct wl_listener unmap_notify; | 31 | struct wl_listener unmap; |
32 | struct wl_listener map_notify; | 32 | struct wl_listener map; |
33 | struct wl_listener destroy; | 33 | struct wl_listener destroy; |
34 | 34 | ||
35 | int pending_width, pending_height; | 35 | int pending_width, pending_height; |
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index 357c8883..dfc54e86 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c | |||
@@ -114,9 +114,10 @@ static void handle_destroy(struct wl_listener *listener, void *data) { | |||
114 | sway_surface->view->surface = NULL; | 114 | sway_surface->view->surface = NULL; |
115 | } | 115 | } |
116 | 116 | ||
117 | static void handle_unmap_notify(struct wl_listener *listener, void *data) { | 117 | static void handle_unmap(struct wl_listener *listener, void *data) { |
118 | struct sway_xwayland_surface *sway_surface = | 118 | struct sway_xwayland_surface *sway_surface = |
119 | wl_container_of(listener, sway_surface, unmap_notify); | 119 | wl_container_of(listener, sway_surface, unmap); |
120 | |||
120 | wl_list_remove(&sway_surface->view->unmanaged_view_link); | 121 | wl_list_remove(&sway_surface->view->unmanaged_view_link); |
121 | wl_list_init(&sway_surface->view->unmanaged_view_link); | 122 | wl_list_init(&sway_surface->view->unmanaged_view_link); |
122 | container_view_destroy(sway_surface->view->swayc); | 123 | container_view_destroy(sway_surface->view->swayc); |
@@ -124,10 +125,10 @@ static void handle_unmap_notify(struct wl_listener *listener, void *data) { | |||
124 | sway_surface->view->surface = NULL; | 125 | sway_surface->view->surface = NULL; |
125 | } | 126 | } |
126 | 127 | ||
127 | static void handle_map_notify(struct wl_listener *listener, void *data) { | 128 | static void handle_map(struct wl_listener *listener, void *data) { |
128 | // TODO put the view back into the tree | 129 | // TODO put the view back into the tree |
129 | struct sway_xwayland_surface *sway_surface = | 130 | struct sway_xwayland_surface *sway_surface = |
130 | wl_container_of(listener, sway_surface, map_notify); | 131 | wl_container_of(listener, sway_surface, map); |
131 | struct wlr_xwayland_surface *xsurface = data; | 132 | struct wlr_xwayland_surface *xsurface = data; |
132 | 133 | ||
133 | sway_surface->view->surface = xsurface->surface; | 134 | sway_surface->view->surface = xsurface->surface; |
@@ -209,11 +210,11 @@ void handle_xwayland_surface(struct wl_listener *listener, void *data) { | |||
209 | &sway_surface->request_configure); | 210 | &sway_surface->request_configure); |
210 | sway_surface->request_configure.notify = handle_configure_request; | 211 | sway_surface->request_configure.notify = handle_configure_request; |
211 | 212 | ||
212 | wl_signal_add(&xsurface->events.unmap_notify, &sway_surface->unmap_notify); | 213 | wl_signal_add(&xsurface->events.unmap, &sway_surface->unmap); |
213 | sway_surface->unmap_notify.notify = handle_unmap_notify; | 214 | sway_surface->unmap.notify = handle_unmap; |
214 | 215 | ||
215 | wl_signal_add(&xsurface->events.map_notify, &sway_surface->map_notify); | 216 | wl_signal_add(&xsurface->events.map, &sway_surface->map); |
216 | sway_surface->map_notify.notify = handle_map_notify; | 217 | sway_surface->map.notify = handle_map; |
217 | 218 | ||
218 | handle_map_notify(&sway_surface->map_notify, xsurface); | 219 | handle_map(&sway_surface->map, xsurface); |
219 | } | 220 | } |