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
This commit is contained in:
Florian Müllner 2020-03-18 22:10:36 +01:00
parent b08b125df6
commit 34c4627db9
2 changed files with 4 additions and 1 deletions

View File

@ -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;

View File

@ -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);