From 04e2bf0b00aae1c6dabe9e1128fcc4aebc82941f Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Fri, 17 Feb 2023 16:30:46 -0800 Subject: [PATCH] lib: don't propagate when creating inhibitor --- lib/mks-display.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/mks-display.c b/lib/mks-display.c index 5ec6433..27d3fda 100644 --- a/lib/mks-display.c +++ b/lib/mks-display.c @@ -176,7 +176,14 @@ mks_display_legacy_event_cb (MksDisplay *self, else if (event_type == GDK_BUTTON_PRESS) { if (priv->inhibitor == NULL) - priv->inhibitor = mks_inhibitor_new (GTK_WIDGET (priv->picture), event); + { + /* Don't allow click to pass through or the user may get + * a dialog in their face while something in the guest + * is grabbed. + */ + priv->inhibitor = mks_inhibitor_new (GTK_WIDGET (priv->picture), event); + return GDK_EVENT_STOP; + } } else if (event_type == GDK_KEY_PRESS) {