[gnome-shell] st/entry: Bind ClutterText reactivity to entry



commit 34c4627db921e88b0401cfec7b3b7951e25eb07f
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Mar 18 22:10:36 2020 +0100

    st/entry: Bind ClutterText reactivity to entry
    
    The text is part of the entry, so it is surprising that it can
    still be edited when the entry itself isn't reactive. Address
    this by setting up a binding instead of expecting all consumers
    to handle the case themselves.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/issues/2423

 js/ui/appDisplay.js | 1 -
 src/st/st-entry.c   | 4 ++++
 2 files changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index b191d5814d..a8c0cb3c22 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -691,7 +691,6 @@ var AllView = GObject.registerClass({
 
             // Toggle search entry
             Main.overview.searchEntry.reactive = !isOpen;
-            Main.overview.searchEntry.clutter_text.reactive = !isOpen;
             Main.overview.searchEntry.clutter_text.editable = !isOpen;
 
             this._displayingPopup = isOpen;
diff --git a/src/st/st-entry.c b/src/st/st-entry.c
index a0f5cb8d0e..2be524bb36 100644
--- a/src/st/st-entry.c
+++ b/src/st/st-entry.c
@@ -977,6 +977,10 @@ st_entry_init (StEntry *entry)
                               "single-line-mode", TRUE,
                               NULL);
 
+  g_object_bind_property (G_OBJECT (entry), "reactive",
+                          priv->entry, "reactive",
+                          G_BINDING_DEFAULT);
+
   g_signal_connect (priv->entry, "key-focus-in",
                     G_CALLBACK (clutter_text_focus_in_cb), entry);
 


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