[gnome-boxes] searchbar: fix unwanted searchbar showing up



commit 694e19faccee9685b54917764492c2f8ebad9d7a
Author: Marc-Andrà Lureau <marcandre lureau gmail com>
Date:   Tue Aug 7 17:12:16 2012 +0200

    searchbar: fix unwanted searchbar showing up
    
    When going into selection mode, and pressing escape, the actor is
    show() to realize the gtk widget so we can start sending events to it.
    However, even if the revealer is not visible, it may happen that the
    widget is made visible. Workaround this by hiding it right away
    
    Acked-by: Zeeshan Ali (Khattak) <zeeshanak gnome org>

 src/searchbar.vala |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/searchbar.vala b/src/searchbar.vala
index 33aa71f..e6a0809 100644
--- a/src/searchbar.vala
+++ b/src/searchbar.vala
@@ -66,10 +66,13 @@ private class Boxes.Searchbar: Boxes.UI {
         if (ui_state != UIState.COLLECTION)
             return handled;
 
-        if (!entry.get_realized ())
-            // This will realize the widget so it can receive events, but
-            // won't actually show it
+        if (!entry.get_realized ()) {
             actor.show ();
+            // should not needed since searchbar actor
+            // is inside hidden revealer, but it ensure
+            // it's not visible..
+            actor.hide ();
+        }
 
         var preedit_changed = false;
         var preedit_changed_id =



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