mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-02-05 04:06:24 -05:00
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:
parent
d819eedc62
commit
92ba822b10
1 changed files with 4 additions and 0 deletions
4
cage.c
4
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue