[clutter/wip/wayland-for-demo: 11/15] stage-wayland: Always create our own surface
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/wip/wayland-for-demo: 11/15] stage-wayland: Always create our own surface
- Date: Wed, 5 Mar 2014 15:21:07 +0000 (UTC)
commit 9a28a8f745498a63437bf035336ee7e9d1ac2bdb
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Feb 6 14:02:19 2014 -0500
stage-wayland: Always create our own surface
Instead of fetching Cogl's.
clutter/wayland/clutter-stage-wayland.c | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
---
diff --git a/clutter/wayland/clutter-stage-wayland.c b/clutter/wayland/clutter-stage-wayland.c
index 4c3e0c3..6471692 100644
--- a/clutter/wayland/clutter-stage-wayland.c
+++ b/clutter/wayland/clutter-stage-wayland.c
@@ -106,19 +106,25 @@ clutter_stage_wayland_realize (ClutterStageWindow *stage_window)
{
ClutterStageWayland *stage_wayland = CLUTTER_STAGE_WAYLAND (stage_window);
ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window);
+ ClutterBackend *backend = CLUTTER_BACKEND (stage_cogl->backend);
+ ClutterBackendWayland *backend_wayland = CLUTTER_BACKEND_WAYLAND (backend);
struct wl_surface *wl_surface;
struct wl_shell_surface *wl_shell_surface;
clutter_stage_window_parent_iface->realize (stage_window);
- wl_surface = cogl_wayland_onscreen_get_surface (stage_cogl->onscreen);
- wl_surface_set_user_data (wl_surface, stage_wayland);
- stage_wayland->wayland_surface = wl_surface;
-
- if (!stage_wayland->foreign_wl_surface)
+ if (stage_wayland->foreign_wl_surface)
{
- wl_shell_surface =
- cogl_wayland_onscreen_get_shell_surface (stage_cogl->onscreen);
+ wl_surface = cogl_wayland_onscreen_get_surface (stage_cogl->onscreen);
+ }
+ else
+ {
+ wl_surface = wl_compositor_create_surface (backend_wayland->wayland_compositor);
+ wl_surface_set_user_data (wl_surface, stage_wayland);
+ stage_wayland->wayland_surface = wl_surface;
+
+ wl_shell_surface = wl_shell_get_shell_surface (backend_wayland->wayland_shell,
+ wl_surface);
wl_shell_surface_add_listener (wl_shell_surface,
&shell_surface_listener,
stage_wayland);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]