aboutsummaryrefslogtreecommitdiff
path: root/rootston/xwayland.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-11-20 07:54:35 -0500
committerGitHub <noreply@github.com>2017-11-20 07:54:35 -0500
commiteb9fd47c2c7b3882b036edd427c3edc2b3c1ecea (patch)
tree682adbf3c1bed7df2567013e2f1d8f9ad0a65640 /rootston/xwayland.c
parent083fe4506b9a57353fdee36ad05252742cc6429f (diff)
parent4d6b3618b8f8a953bd811b4cbf0975e6c00d96b8 (diff)
Merge pull request #436 from acrisci/bug/roots-xsurface-unmap
rootston: remove unmapped surface from desktop
Diffstat (limited to 'rootston/xwayland.c')
-rw-r--r--rootston/xwayland.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/rootston/xwayland.c b/rootston/xwayland.c
index f5cb7857..c92c424b 100644
--- a/rootston/xwayland.c
+++ b/rootston/xwayland.c
@@ -175,22 +175,21 @@ static void handle_map_notify(struct wl_listener *listener, void *data) {
wl_container_of(listener, roots_surface, map_notify);
struct wlr_xwayland_surface *xsurface = data;
struct roots_view *view = roots_surface->view;
- //struct roots_desktop *desktop = view->desktop;
+ struct roots_desktop *desktop = view->desktop;
view->wlr_surface = xsurface->surface;
view->x = (double)xsurface->x;
view->y = (double)xsurface->y;
- // TODO: add view to desktop
+ wl_list_insert(&desktop->views, &view->link);
}
static void handle_unmap_notify(struct wl_listener *listener, void *data) {
struct roots_xwayland_surface *roots_surface =
wl_container_of(listener, roots_surface, unmap_notify);
- //struct roots_desktop *desktop = roots_surface->view->desktop;
roots_surface->view->wlr_surface = NULL;
- // TODO: remove view from desktop
+ wl_list_remove(&roots_surface->view->link);
}
void handle_xwayland_surface(struct wl_listener *listener, void *data) {