diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-02-06 14:02:19 -0500 |
---|---|---|
committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-03-05 10:20:50 -0500 |
commit | 9a28a8f745498a63437bf035336ee7e9d1ac2bdb (patch) | |
tree | d79be440e06aa1af18b22571d8ab64675177b57c | |
parent | 7c8c1a91971c1656fabc0d2ac35ef8e0fd670415 (diff) | |
download | clutter-9a28a8f745498a63437bf035336ee7e9d1ac2bdb.tar.gz |
stage-wayland: Always create our own surface
Instead of fetching Cogl's.
-rw-r--r-- | 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 4c3e0c3e0..6471692d2 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); |