[gnome-shell/wip/carlosg/osk-cldr: 154/154] st: Make st_button_fake_release() work with touch press
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/carlosg/osk-cldr: 154/154] st: Make st_button_fake_release() work with touch press
- Date: Fri, 10 Nov 2017 18:31:44 +0000 (UTC)
commit 50596de651253bc22dddf2621c95878575db0857
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Nov 10 18:29:53 2017 +0100
st: Make st_button_fake_release() work with touch press
The st_button_release() call wouldn't happen because StButton does not
set priv->buttons on touch events. And if we make it called, we can't
try to unset the device grab at the end of the function, as device/sequence
are unset earlier on.
src/st/st-button.c | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
---
diff --git a/src/st/st-button.c b/src/st/st-button.c
index 38fe207..8f5c492 100644
--- a/src/st/st-button.c
+++ b/src/st/st-button.c
@@ -765,7 +765,13 @@ st_button_fake_release (StButton *button)
g_return_if_fail (ST_IS_BUTTON (button));
priv = st_button_get_instance_private (button);
- if (priv->pressed)
+ if (priv->device && priv->press_sequence)
+ {
+ 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);
@@ -775,14 +781,6 @@ st_button_fake_release (StButton *button)
clutter_ungrab_pointer ();
}
- if (priv->device &&
- priv->press_sequence)
- {
- clutter_input_device_sequence_ungrab (priv->device,
- priv->press_sequence);
- priv->press_sequence = NULL;
- }
-
priv->device = NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]