From 92ba822b107b9cf81091a188fb7c415c49d8d12f Mon Sep 17 00:00:00 2001 From: Jente Hidskes Date: Sat, 24 Nov 2018 14:04:08 +0100 Subject: [PATCH] Actually maximize the window. It appears that wlr_xdg_toplevel_set_maximized does not actually change the size of the surface. Rather, it only makes the surface think it is maximized. Hence, we need to set the size to that of the output manually. --- cage.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cage.c b/cage.c index 849f609..e1b32a2 100644 --- a/cage.c +++ b/cage.c @@ -542,6 +542,10 @@ xdg_surface_map(struct wl_listener *listener, void *data) /* If this is our "root" view, maximize it. Otherwise, center the "child". */ if (view->xdg_surface->toplevel->parent == NULL) { + int output_width, output_height; + struct cg_output *output = view->server->output; + wlr_output_effective_resolution(output->wlr_output, &output_width, &output_height); + wlr_xdg_toplevel_set_size(view->xdg_surface, output_width, output_height); wlr_xdg_toplevel_set_maximized(view->xdg_surface, true); } else { center_view(view);