From d71c0a94a1ce552f36e79fc2530dca9c8b8022d2 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Thu, 28 Sep 2023 01:23:20 +0200 Subject: [PATCH] stage-view: Add API to query cursor overlay inhibition It will be used in a later commit to check if the stage-view maybe have a software cursor on it. Part-of: --- src/backends/meta-stage-view.c | 9 +++++++++ src/backends/meta-stage-view.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/src/backends/meta-stage-view.c b/src/backends/meta-stage-view.c index fef051f81..45d696931 100644 --- a/src/backends/meta-stage-view.c +++ b/src/backends/meta-stage-view.c @@ -241,3 +241,12 @@ meta_stage_view_uninhibit_cursor_overlay (MetaStageView *view) priv->inhibit_cursor_overlay_count--; } + +gboolean +meta_stage_view_is_cursor_overlay_inhibited (MetaStageView *view) +{ + MetaStageViewPrivate *priv = + meta_stage_view_get_instance_private (view); + + return priv->inhibit_cursor_overlay_count > 0; +} diff --git a/src/backends/meta-stage-view.h b/src/backends/meta-stage-view.h index 83836ed96..4a897c38b 100644 --- a/src/backends/meta-stage-view.h +++ b/src/backends/meta-stage-view.h @@ -28,3 +28,5 @@ G_DECLARE_DERIVABLE_TYPE (MetaStageView, void meta_stage_view_inhibit_cursor_overlay (MetaStageView *view); void meta_stage_view_uninhibit_cursor_overlay (MetaStageView *view); + +gboolean meta_stage_view_is_cursor_overlay_inhibited (MetaStageView *view);