From 838fc6276feb746e66a50b38a560f3b5e33fb273 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Thu, 12 Jan 2012 15:25:02 +0000 Subject: [PATCH] wayland: Support setting fullscreen before the stage is realized --- clutter/wayland/clutter-stage-wayland.c | 8 ++++++++ clutter/wayland/clutter-stage-wayland.h | 1 + 2 files changed, 9 insertions(+) diff --git a/clutter/wayland/clutter-stage-wayland.c b/clutter/wayland/clutter-stage-wayland.c index 4fb551888..0555b2f87 100644 --- a/clutter/wayland/clutter-stage-wayland.c +++ b/clutter/wayland/clutter-stage-wayland.c @@ -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 diff --git a/clutter/wayland/clutter-stage-wayland.h b/clutter/wayland/clutter-stage-wayland.h index 0394307f1..ea56624e3 100644 --- a/clutter/wayland/clutter-stage-wayland.h +++ b/clutter/wayland/clutter-stage-wayland.h @@ -52,6 +52,7 @@ struct _ClutterStageWayland struct wl_surface *wayland_surface; struct wl_shell_surface *wayland_shell_surface; + gboolean fullscreen; }; struct _ClutterStageWaylandClass