wayland: Support setting fullscreen before the stage is realized
authorRob Bradford <rob@linux.intel.com>
Thu, 12 Jan 2012 15:25:02 +0000 (15:25 +0000)
committerRob Bradford <rob@linux.intel.com>
Thu, 26 Jan 2012 14:14:13 +0000 (14:14 +0000)
clutter/wayland/clutter-stage-wayland.c
clutter/wayland/clutter-stage-wayland.h

index 4fb5518..0555b2f 100644 (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
index 0394307..ea56624 100644 (file)
@@ -52,6 +52,7 @@ struct _ClutterStageWayland
 
   struct wl_surface *wayland_surface;
   struct wl_shell_surface *wayland_shell_surface;
+  gboolean fullscreen;
 };
 
 struct _ClutterStageWaylandClass