From d2c3272eb7cb3e28f3d50e04a98f1fa799f5bac2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Mon, 20 Apr 2020 22:41:12 +0200 Subject: [PATCH] clutter/paint-context: Add 'no-cursors' paint flag Will be used by the stage to not paint the overlays. We skip all overlays since overlays are only ever used for pointer cursors when the hardware cursors cannot or should not be used. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1207 --- clutter/clutter/clutter-paint-context.h | 1 + src/backends/meta-stage.c | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/clutter/clutter/clutter-paint-context.h b/clutter/clutter/clutter-paint-context.h index 6b65fecac..f781728c3 100644 --- a/clutter/clutter/clutter-paint-context.h +++ b/clutter/clutter/clutter-paint-context.h @@ -32,6 +32,7 @@ typedef struct _ClutterPaintContext ClutterPaintContext; typedef enum _ClutterPaintFlag { CLUTTER_PAINT_FLAG_NONE = 0, + CLUTTER_PAINT_FLAG_NO_CURSORS = 1 << 0, } ClutterPaintFlag; #define CLUTTER_TYPE_PAINT_CONTEXT (clutter_paint_context_get_type ()) diff --git a/src/backends/meta-stage.c b/src/backends/meta-stage.c index e5f156880..072241ec9 100644 --- a/src/backends/meta-stage.c +++ b/src/backends/meta-stage.c @@ -206,8 +206,12 @@ meta_stage_paint (ClutterActor *actor, g_signal_emit (stage, signals[ACTORS_PAINTED], 0); - for (l = stage->overlays; l; l = l->next) - meta_overlay_paint (l->data, paint_context); + if (!(clutter_paint_context_get_paint_flags (paint_context) & + CLUTTER_PAINT_FLAG_NO_CURSORS)) + { + for (l = stage->overlays; l; l = l->next) + meta_overlay_paint (l->data, paint_context); + } if (view) {