aboutsummaryrefslogtreecommitdiff
path: root/rootston
diff options
context:
space:
mode:
Diffstat (limited to 'rootston')
-rw-r--r--rootston/main.c1
-rw-r--r--rootston/xdg_shell.c7
-rw-r--r--rootston/xdg_shell_v6.c7
3 files changed, 7 insertions, 8 deletions
diff --git a/rootston/main.c b/rootston/main.c
index cecdb23d..07a41d5d 100644
--- a/rootston/main.c
+++ b/rootston/main.c
@@ -72,6 +72,7 @@ int main(int argc, char **argv) {
}
wl_display_run(server.wl_display);
+ wl_display_destroy_clients(server.wl_display);
wl_display_destroy(server.wl_display);
return 0;
}
diff --git a/rootston/xdg_shell.c b/rootston/xdg_shell.c
index 83a1caf0..03ae1dc6 100644
--- a/rootston/xdg_shell.c
+++ b/rootston/xdg_shell.c
@@ -135,11 +135,10 @@ static void get_size(const struct roots_view *view, struct wlr_box *box) {
if (surface->geometry.width > 0 && surface->geometry.height > 0) {
box->width = surface->geometry.width;
box->height = surface->geometry.height;
- } else if (view->wlr_surface != NULL) {
- box->width = view->wlr_surface->current->width;
- box->height = view->wlr_surface->current->height;
} else {
- box->width = box->height = 0;
+ assert(surface->surface);
+ box->width = surface->surface->current->width;
+ box->height = surface->surface->current->height;
}
}
diff --git a/rootston/xdg_shell_v6.c b/rootston/xdg_shell_v6.c
index 5a829f5d..90b11690 100644
--- a/rootston/xdg_shell_v6.c
+++ b/rootston/xdg_shell_v6.c
@@ -136,11 +136,10 @@ static void get_size(const struct roots_view *view, struct wlr_box *box) {
if (surface->geometry.width > 0 && surface->geometry.height > 0) {
box->width = surface->geometry.width;
box->height = surface->geometry.height;
- } else if (view->wlr_surface != NULL) {
- box->width = view->wlr_surface->current->width;
- box->height = view->wlr_surface->current->height;
} else {
- box->width = box->height = 0;
+ assert(surface->surface);
+ box->width = surface->surface->current->width;
+ box->height = surface->surface->current->height;
}
}