aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/xwayland.c
diff options
context:
space:
mode:
authorLibravatar emersion <contact@emersion.fr>2018-03-30 13:34:25 -0400
committerLibravatar emersion <contact@emersion.fr>2018-03-30 13:34:25 -0400
commitcf09ea184b891594331240eb860f28975dcb8b8c (patch)
tree533fa2ed4d161a9e4c5d83c12387e51c03ea8ca0 /sway/desktop/xwayland.c
parentMerge pull request #1664 from swaywm/xwayland-add-to-focused (diff)
downloadsway-cf09ea184b891594331240eb860f28975dcb8b8c.tar.gz
sway-cf09ea184b891594331240eb860f28975dcb8b8c.tar.zst
sway-cf09ea184b891594331240eb860f28975dcb8b8c.zip
Use the new map/unmap events for xwayland views
Diffstat (limited to 'sway/desktop/xwayland.c')
-rw-r--r--sway/desktop/xwayland.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c
index 3e08b20e..13eaf79a 100644
--- a/sway/desktop/xwayland.c
+++ b/sway/desktop/xwayland.c
@@ -119,9 +119,9 @@ static void handle_destroy(struct wl_listener *listener, void *data) {
119 free(sway_surface); 119 free(sway_surface);
120} 120}
121 121
122static void handle_unmap_notify(struct wl_listener *listener, void *data) { 122static void handle_unmap(struct wl_listener *listener, void *data) {
123 struct sway_xwayland_surface *sway_surface = 123 struct sway_xwayland_surface *sway_surface =
124 wl_container_of(listener, sway_surface, unmap_notify); 124 wl_container_of(listener, sway_surface, unmap);
125 125
126 wl_list_remove(&sway_surface->view->unmanaged_view_link); 126 wl_list_remove(&sway_surface->view->unmanaged_view_link);
127 wl_list_init(&sway_surface->view->unmanaged_view_link); 127 wl_list_init(&sway_surface->view->unmanaged_view_link);
@@ -136,10 +136,10 @@ static void handle_unmap_notify(struct wl_listener *listener, void *data) {
136 sway_surface->view->surface = NULL; 136 sway_surface->view->surface = NULL;
137} 137}
138 138
139static void handle_map_notify(struct wl_listener *listener, void *data) { 139static void handle_map(struct wl_listener *listener, void *data) {
140 // TODO put the view back into the tree 140 // TODO put the view back into the tree
141 struct sway_xwayland_surface *sway_surface = 141 struct sway_xwayland_surface *sway_surface =
142 wl_container_of(listener, sway_surface, map_notify); 142 wl_container_of(listener, sway_surface, map);
143 struct wlr_xwayland_surface *xsurface = data; 143 struct wlr_xwayland_surface *xsurface = data;
144 144
145 sway_surface->view->surface = xsurface->surface; 145 sway_surface->view->surface = xsurface->surface;
@@ -221,11 +221,11 @@ void handle_xwayland_surface(struct wl_listener *listener, void *data) {
221 &sway_surface->request_configure); 221 &sway_surface->request_configure);
222 sway_surface->request_configure.notify = handle_configure_request; 222 sway_surface->request_configure.notify = handle_configure_request;
223 223
224 wl_signal_add(&xsurface->events.unmap_notify, &sway_surface->unmap_notify); 224 wl_signal_add(&xsurface->events.unmap, &sway_surface->unmap);
225 sway_surface->unmap_notify.notify = handle_unmap_notify; 225 sway_surface->unmap.notify = handle_unmap;
226 226
227 wl_signal_add(&xsurface->events.map_notify, &sway_surface->map_notify); 227 wl_signal_add(&xsurface->events.map, &sway_surface->map);
228 sway_surface->map_notify.notify = handle_map_notify; 228 sway_surface->map.notify = handle_map;
229 229
230 handle_map_notify(&sway_surface->map_notify, xsurface); 230 handle_map(&sway_surface->map, xsurface);
231} 231}