mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
stage: Refine our assertions for overlays in MetaStage
We indeed call this function if we're not an X11 compositor, but in this case we're simply calling it to say that we have no cursor overlay. Make sure not to assert fail in this case.
This commit is contained in:
parent
9feb9d6bca
commit
b879af46b3
@ -88,11 +88,11 @@ meta_overlay_set (MetaOverlay *overlay,
|
||||
static void
|
||||
meta_overlay_paint (MetaOverlay *overlay)
|
||||
{
|
||||
g_assert (meta_is_wayland_compositor ());
|
||||
|
||||
if (!overlay->enabled)
|
||||
return;
|
||||
|
||||
g_assert (meta_is_wayland_compositor ());
|
||||
|
||||
cogl_framebuffer_draw_rectangle (cogl_get_draw_framebuffer (),
|
||||
overlay->pipeline,
|
||||
overlay->current_rect.x,
|
||||
@ -190,7 +190,7 @@ meta_stage_set_cursor (MetaStage *stage,
|
||||
{
|
||||
MetaStagePrivate *priv = meta_stage_get_instance_private (stage);
|
||||
|
||||
g_assert (meta_is_wayland_compositor ());
|
||||
g_assert (meta_is_wayland_compositor () || texture == NULL);
|
||||
|
||||
meta_overlay_set (&priv->cursor_overlay, texture, rect);
|
||||
queue_redraw_for_overlay (stage, &priv->cursor_overlay);
|
||||
|
Loading…
Reference in New Issue
Block a user