[clutter] wayland: Support setting fullscreen before the stage is realized
- From: Rob Bradford <rbradford src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] wayland: Support setting fullscreen before the stage is realized
- Date: Thu, 26 Jan 2012 14:45:49 +0000 (UTC)
commit 838fc6276feb746e66a50b38a560f3b5e33fb273
Author: Rob Bradford <rob linux intel com>
Date: Thu Jan 12 15:25:02 2012 +0000
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(+), 0 deletions(-)
---
diff --git a/clutter/wayland/clutter-stage-wayland.c b/clutter/wayland/clutter-stage-wayland.c
index 4fb5518..0555b2f 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 0394307..ea56624 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]