diff options
Diffstat (limited to 'rootston/wl_shell.c')
-rw-r--r-- | rootston/wl_shell.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/rootston/wl_shell.c b/rootston/wl_shell.c index 65067920..be658f40 100644 --- a/rootston/wl_shell.c +++ b/rootston/wl_shell.c @@ -88,19 +88,23 @@ static void handle_surface_commit(struct wl_listener *listener, void *data) { struct roots_view *view = roots_surface->view; struct wlr_surface *wlr_surface = view->wlr_surface; + view_apply_damage(view); + int width = wlr_surface->current->width; int height = wlr_surface->current->height; - + double x = view->x; + double y = view->y; if (view->pending_move_resize.update_x) { - view->x = view->pending_move_resize.x + - view->pending_move_resize.width - width; + x = view->pending_move_resize.x + view->pending_move_resize.width - + width; view->pending_move_resize.update_x = false; } if (view->pending_move_resize.update_y) { - view->y = view->pending_move_resize.y + - view->pending_move_resize.height - height; + y = view->pending_move_resize.y + view->pending_move_resize.height - + height; view->pending_move_resize.update_y = false; } + view_update_position(view, x, y); } static void handle_destroy(struct wl_listener *listener, void *data) { @@ -114,7 +118,8 @@ static void handle_destroy(struct wl_listener *listener, void *data) { wl_list_remove(&roots_surface->set_state.link); wl_list_remove(&roots_surface->surface_commit.link); wl_list_remove(&roots_surface->view->link); - view_destroy(roots_surface->view); + view_finish(roots_surface->view); + free(roots_surface->view); free(roots_surface); } |