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.
This commit is contained in:
Sebastian Krzyszkowiak 2019-07-12 14:08:29 +02:00 committed by Simon Ser
parent 6345000b92
commit 28cc1730e8
2 changed files with 8 additions and 0 deletions

View file

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

View file

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