[cogl/rbradford/wayland-update: 2/2] wayland: Add API to access the shell surface for the onscreen
- From: Rob Bradford <rbradford src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/rbradford/wayland-update: 2/2] wayland: Add API to access the shell surface for the onscreen
- Date: Thu, 8 Dec 2011 16:27:40 +0000 (UTC)
commit 005709e550f161c169b91953011c884f1a171806
Author: Rob Bradford <rob linux intel com>
Date: Thu Dec 8 16:21:57 2011 +0000
wayland: Add API to access the shell surface for the onscreen
cogl/cogl-onscreen.h | 2 ++
cogl/winsys/cogl-winsys-egl.c | 16 ++++++++++++++++
2 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/cogl/cogl-onscreen.h b/cogl/cogl-onscreen.h
index 8a9d64a..9bcc769 100644
--- a/cogl/cogl-onscreen.h
+++ b/cogl/cogl-onscreen.h
@@ -131,6 +131,8 @@ cogl_win32_onscreen_get_window (CoglOnscreen *onscreen);
#if defined (COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT)
struct wl_surface *
cogl_wayland_onscreen_get_surface (CoglOnscreen *onscreen);
+struct wl_shell_surface *
+cogl_wayland_onscreen_get_shell_surface (CoglOnscreen *onscreen);
#endif /* COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT */
#define cogl_onscreen_set_swap_throttled cogl_onscreen_set_swap_throttled_EXP
diff --git a/cogl/winsys/cogl-winsys-egl.c b/cogl/winsys/cogl-winsys-egl.c
index abf7d23..895a8d8 100644
--- a/cogl/winsys/cogl-winsys-egl.c
+++ b/cogl/winsys/cogl-winsys-egl.c
@@ -1936,6 +1936,22 @@ cogl_wayland_onscreen_get_surface (CoglOnscreen *onscreen)
return NULL;
}
+
+struct wl_shell_surface *
+cogl_wayland_onscreen_get_shell_surface (CoglOnscreen *onscreen)
+{
+ CoglFramebuffer *fb;
+
+ fb = COGL_FRAMEBUFFER (onscreen);
+ if (fb->allocated)
+ {
+ CoglOnscreenEGL *egl_onscreen = onscreen->winsys;
+ return egl_onscreen->wayland_shell_surface;
+ }
+ else
+ return NULL;
+}
+
#endif /* COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT */
#ifdef EGL_KHR_image_base
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]