Handle fullscreen flag when mapping a surface.

This commit is contained in:
Ryan Dwyer 2018-04-17 11:04:57 +10:00
parent a44d016e2b
commit 143b528f71
3 changed files with 12 additions and 0 deletions

View file

@ -128,4 +128,8 @@ void handle_wl_shell_surface(struct wl_listener *listener, void *data) {
wl_signal_add(&shell_surface->events.destroy, &wl_shell_view->destroy); wl_signal_add(&shell_surface->events.destroy, &wl_shell_view->destroy);
view_map(&wl_shell_view->view, shell_surface->surface); view_map(&wl_shell_view->view, shell_surface->surface);
if (shell_surface->state == WLR_WL_SHELL_SURFACE_STATE_FULLSCREEN) {
view_set_fullscreen(&wl_shell_view->view, true);
}
} }

View file

@ -212,6 +212,10 @@ static void handle_map(struct wl_listener *listener, void *data) {
xdg_shell_v6_view->new_popup.notify = handle_new_popup; xdg_shell_v6_view->new_popup.notify = handle_new_popup;
wl_signal_add(&xdg_surface->events.new_popup, wl_signal_add(&xdg_surface->events.new_popup,
&xdg_shell_v6_view->new_popup); &xdg_shell_v6_view->new_popup);
if (xdg_surface->toplevel->current.fullscreen) {
view_set_fullscreen(view, true);
}
} }
static void handle_destroy(struct wl_listener *listener, void *data) { static void handle_destroy(struct wl_listener *listener, void *data) {

View file

@ -248,6 +248,10 @@ static void handle_map(struct wl_listener *listener, void *data) {
// Put it back into the tree // Put it back into the tree
wlr_xwayland_surface_set_maximized(xsurface, true); wlr_xwayland_surface_set_maximized(xsurface, true);
view_map(view, xsurface->surface); view_map(view, xsurface->surface);
if (xsurface->fullscreen) {
view_set_fullscreen(view, true);
}
} }
static void handle_destroy(struct wl_listener *listener, void *data) { static void handle_destroy(struct wl_listener *listener, void *data) {