[gnome-shell/wip/carlosg/app-grid-gestures: 83/86] st/button: Consider touch sequences for ::pressed state




commit 32f605e4ca8e7d25a0bb4804e00ea2cbb3175cc2
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Mar 18 18:40:40 2021 +0100

    st/button: Consider touch sequences for ::pressed state
    
    We do notify on the ::pressed property after touch begin/end and
    recording the event sequence, but we do not return the correct value
    if the button was triggered via touch.
    
    Consider the event sequence also in the ::pressed getter, so the
    button is considered pressed.

 src/st/st-button.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/st/st-button.c b/src/st/st-button.c
index 1be9de5f09..eae245928a 100644
--- a/src/st/st-button.c
+++ b/src/st/st-button.c
@@ -432,7 +432,7 @@ st_button_get_property (GObject    *gobject,
       g_value_set_boolean (value, priv->is_checked);
       break;
     case PROP_PRESSED:
-      g_value_set_boolean (value, priv->pressed != 0);
+      g_value_set_boolean (value, priv->pressed != 0 || priv->press_sequence != NULL);
       break;
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]