wayland: make the surface toplevel when showing the stage

Cogl (as of 0b2b46ce) now only sets the shell surface as toplevel when
the CoglOnscreen is shown.

Without calling wl_shell_surface_set_toplevel the compositor will not
know what role to give to the compositor and thus the stage will not
appear.

When we look to support multiple roles / foreign surfaces we will need
to revisit this call and ensure we only call it when we are working in
the default case.

https://bugzilla.gnome.org/show_bug.cgi?id=703188
This commit is contained in:
Rob Bradford 2013-06-27 14:22:02 +01:00
parent 5758ab5c89
commit e352047499

View File

@ -134,9 +134,13 @@ clutter_stage_wayland_show (ClutterStageWindow *stage_window,
gboolean do_raise) gboolean do_raise)
{ {
ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window); ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window);
ClutterStageWayland *stage_wayland = CLUTTER_STAGE_WAYLAND (stage_window);
clutter_stage_window_parent_iface->show (stage_window, do_raise); clutter_stage_window_parent_iface->show (stage_window, do_raise);
/* TODO: must not call this on foreign surfaces when we add that support */
wl_shell_surface_set_toplevel (stage_wayland->wayland_shell_surface);
/* We need to queue a redraw after the stage is shown because all of /* We need to queue a redraw after the stage is shown because all of
* the other queue redraws up to this point will have been ignored * the other queue redraws up to this point will have been ignored
* because the actor was not visible. The other backends do not need * because the actor was not visible. The other backends do not need