diff options
author | Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm> | 2019-07-12 14:08:29 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-07-15 23:12:50 +0300 |
commit | 28cc1730e827b919ecef9276af32655ec5e69043 (patch) | |
tree | cbbb018328eaa5cfbce604f3316c68396413571c /rootston | |
parent | 6345000b929293a2917a1a08a6d2751020d36e3c (diff) |
xdg_shell(_v6): Take maximize/fullscreen state into account on view init
set_maximized and set_fullscreen calls can come before the view is
constructed and before its signal handlers are registered.
Diffstat (limited to 'rootston')
-rw-r--r-- | rootston/xdg_shell.c | 4 | ||||
-rw-r--r-- | rootston/xdg_shell_v6.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/rootston/xdg_shell.c b/rootston/xdg_shell.c index 60222750..7b12ec70 100644 --- a/rootston/xdg_shell.c +++ b/rootston/xdg_shell.c @@ -465,6 +465,10 @@ void handle_xdg_shell_surface(struct wl_listener *listener, void *data) { roots_surface->xdg_surface = surface; surface->data = roots_surface; + view_maximize(&roots_surface->view, surface->toplevel->client_pending.maximized); + view_set_fullscreen(&roots_surface->view, surface->toplevel->client_pending.fullscreen, + surface->toplevel->client_pending.fullscreen_output); + roots_surface->surface_commit.notify = handle_surface_commit; wl_signal_add(&surface->surface->events.commit, &roots_surface->surface_commit); diff --git a/rootston/xdg_shell_v6.c b/rootston/xdg_shell_v6.c index b80ea38d..917ca3a0 100644 --- a/rootston/xdg_shell_v6.c +++ b/rootston/xdg_shell_v6.c @@ -462,6 +462,10 @@ void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) { view_init(&roots_surface->view, &view_impl, ROOTS_XDG_SHELL_V6_VIEW, desktop); roots_surface->xdg_surface_v6 = surface; + view_maximize(&roots_surface->view, surface->toplevel->client_pending.maximized); + view_set_fullscreen(&roots_surface->view, surface->toplevel->client_pending.fullscreen, + surface->toplevel->client_pending.fullscreen_output); + roots_surface->surface_commit.notify = handle_surface_commit; wl_signal_add(&surface->surface->events.commit, &roots_surface->surface_commit); |