diff options
author | Tony Crisci <tony@dubstepdish.com> | 2017-11-20 07:40:22 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2017-11-20 07:40:22 -0500 |
commit | 4d6b3618b8f8a953bd811b4cbf0975e6c00d96b8 (patch) | |
tree | 682adbf3c1bed7df2567013e2f1d8f9ad0a65640 /rootston | |
parent | 083fe4506b9a57353fdee36ad05252742cc6429f (diff) |
rootston: remove unmapped surface from desktop
Diffstat (limited to 'rootston')
-rw-r--r-- | rootston/output.c | 2 | ||||
-rw-r--r-- | rootston/xwayland.c | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/rootston/output.c b/rootston/output.c index 3b08d7bf..83ff37fd 100644 --- a/rootston/output.c +++ b/rootston/output.c @@ -38,7 +38,7 @@ static void rotate_child_position(double *sx, double *sy, double sw, double sh, static void render_surface(struct wlr_surface *surface, struct roots_desktop *desktop, struct wlr_output *wlr_output, struct timespec *when, double lx, double ly, float rotation) { - if (surface->texture->valid) { + if (wlr_surface_has_buffer(surface)) { int width = surface->current->width; int height = surface->current->height; int render_width = width * wlr_output->scale; 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) { |