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.
This commit is contained in:
Jente Hidskes 2018-11-24 14:04:08 +01:00
parent d819eedc62
commit 92ba822b10
No known key found for this signature in database
GPG key ID: 04BE5A29F32D91EA

4
cage.c
View file

@ -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);