[gnome-shell] st/button: Ungrab device before calling st_button_release
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] st/button: Ungrab device before calling st_button_release
- Date: Thu, 4 Jul 2019 16:39:30 +0000 (UTC)
commit 0bdd1b6fc47433c723c7f368fe842a9ddac082bf
Author: Jonas Dreßler <verdre v0yd nl>
Date: Thu Jul 4 17:33:06 2019 +0200
st/button: Ungrab device before calling st_button_release
Since priv->device gets set to NULL inside st_button_release, ungrab the
input device before calling st_button_release and avoid
clutter_input_device_ungrab failing with a critical error.
This fixes a regression introduced with
d5a1a888d91b9456632a8393cf14c443e6df6a5b
While at it, also remove the superfluous line resetting priv->device to
NULL and move the check for priv->grabbed into an elseif block since
there should be no case where StButton has both grabs at the same time.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/614
src/st/st-button.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/src/st/st-button.c b/src/st/st-button.c
index fb7ccd80d..3897c7c87 100644
--- a/src/st/st-button.c
+++ b/src/st/st-button.c
@@ -779,18 +779,15 @@ st_button_fake_release (StButton *button)
clutter_input_device_sequence_ungrab (priv->device,
priv->press_sequence);
}
-
- if (priv->pressed || priv->press_sequence)
- st_button_release (button, priv->device,
- priv->pressed, 0, NULL);
-
- if (priv->grabbed)
+ else if (priv->grabbed)
{
priv->grabbed = 0;
clutter_input_device_ungrab (priv->device);
}
- priv->device = NULL;
+ if (priv->pressed || priv->press_sequence)
+ st_button_release (button, priv->device,
+ priv->pressed, 0, NULL);
}
/******************************************************************************/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]