[PATCH v4 3/4] add fullscreen interface update
juan.j.zhao at linux.intel.com
juan.j.zhao at linux.intel.com
Mon Jan 16 08:47:56 PST 2012
From: Juan Zhao <juan.j.zhao at linux.intel.com>
mainly update shell part here
Signed-off-by: Juan Zhao <juan.j.zhao at linux.intel.com>
Signed-off-by: Zhiwen Wu <zhiwen.wu at linux.intel.com>
---
src/compositor.c | 17 +++++++++++++++++
src/compositor.h | 7 +++++++
src/shell.c | 1 +
3 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/src/compositor.c b/src/compositor.c
index 945e357..1f0cb2d 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -307,6 +307,23 @@ weston_surface_configure(struct weston_surface *surface,
pixman_region32_init(&surface->opaque);
}
+WL_EXPORT void
+weston_surface_center_on_output( struct weston_surface *surface,
+ struct weston_output *output )
+{
+ struct weston_mode *mode = output->current;
+
+ surface->x = output->x + (mode->width - surface->width) / 2;
+ surface->y = output->y + (mode->height - surface->height) / 2;
+}
+
+int
+weston_surface_set_fullscreen( struct weston_output *output,
+ struct weston_surface *surface)
+{
+ /*do the real set fullscreen*/
+}
+
static void
weston_surface_transform(struct weston_surface *surface,
int32_t x, int32_t y, int32_t *sx, int32_t *sy)
diff --git a/src/compositor.h b/src/compositor.h
index b298ef8..90086e7 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -382,6 +382,13 @@ weston_surface_damage_rectangle(struct weston_surface *surface,
int32_t x, int32_t y,
int32_t width, int32_t height);
+void
+weston_surface_center_on_output( struct weston_surface *surface,
+ struct weston_output *output );
+int
+weston_surface_set_fullscreen( struct weston_output *output,
+ struct weston_surface *surface);
+
uint32_t
weston_compositor_get_time(void);
diff --git a/src/shell.c b/src/shell.c
index 01446d5..a131ae5 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -565,6 +565,7 @@ static const struct wl_shell_surface_interface shell_surface_implementation = {
shell_surface_set_toplevel,
shell_surface_set_transient,
shell_surface_set_fullscreen,
+ NULL,
shell_surface_set_popup
};
--
1.7.5.4
More information about the wayland-devel
mailing list