wayland: Support setting fullscreen before the stage is realized

This commit is contained in:
Rob Bradford 2012-01-12 15:25:02 +00:00
parent da19c3dfca
commit 838fc6276f
2 changed files with 9 additions and 0 deletions

View File

@ -96,6 +96,9 @@ clutter_stage_wayland_realize (ClutterStageWindow *stage_window)
stage_wayland->wayland_surface = wl_surface;
stage_wayland->wayland_shell_surface = wl_shell_surface;
if (stage_wayland->fullscreen)
wl_shell_surface_set_fullscreen (stage_wayland->wayland_shell_surface);
return TRUE;
}
@ -105,6 +108,11 @@ clutter_stage_wayland_set_fullscreen (ClutterStageWindow *stage_window,
{
ClutterStageWayland *stage_wayland = CLUTTER_STAGE_WAYLAND (stage_window);
stage_wayland->fullscreen = fullscreen;
if (!stage_wayland->wayland_shell_surface) /* Not realized yet */
return;
if (fullscreen)
wl_shell_surface_set_fullscreen (stage_wayland->wayland_shell_surface);
else

View File

@ -52,6 +52,7 @@ struct _ClutterStageWayland
struct wl_surface *wayland_surface;
struct wl_shell_surface *wayland_shell_surface;
gboolean fullscreen;
};
struct _ClutterStageWaylandClass