From b879af46b3b6c78c4cac026108227474e9838ff3 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Thu, 21 Aug 2014 18:03:03 -0400 Subject: [PATCH] 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. --- src/backends/meta-stage.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backends/meta-stage.c b/src/backends/meta-stage.c index 7f50a2012..e304441f7 100644 --- a/src/backends/meta-stage.c +++ b/src/backends/meta-stage.c @@ -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);