static void wl_shell_surface_set_state (MetaWaylandSurface *surface, MetaWlShellSurfaceState state) { MetaWaylandWlShellSurface *wl_shell_surface = META_WAYLAND_WL_SHELL_SURFACE (surface->role); MetaWlShellSurfaceState old_state = wl_shell_surface->state; wl_shell_surface->state = state; if (surface->window && old_state != state) { if (old_state == META_WL_SHELL_SURFACE_STATE_POPUP && wl_shell_surface->popup) { meta_wayland_popup_dismiss (wl_shell_surface->popup); wl_shell_surface->popup = NULL; } if (state == META_WL_SHELL_SURFACE_STATE_FULLSCREEN) meta_window_make_fullscreen (surface->window); else meta_window_unmake_fullscreen (surface->window); if (state == META_WL_SHELL_SURFACE_STATE_MAXIMIZED) meta_window_maximize (surface->window, META_MAXIMIZE_BOTH); else meta_window_unmaximize (surface->window, META_MAXIMIZE_BOTH); } }
static void xdg_surface_set_fullscreen (struct wl_client *client, struct wl_resource *resource, struct wl_resource *output_resource) { MetaWaylandSurface *surface = surface_from_xdg_surface_resource (resource); meta_window_make_fullscreen (surface->window); }