Fixes search entry losing typing focus

When the search entry was out of focus and types were redirected to it,
if the current selected application was hidden by the filtering, both
the holder and entry lost focus. This stopped the typing event
redirection. Now the entry is always focused when typing.
This commit is contained in:
hordepfo 2014-01-22 03:20:56 +00:00
parent 0feb06e795
commit 8560efebea

View File

@ -887,6 +887,8 @@ class pluginclass( object ):
# Forward all text to the search box
def keyPress( self, widget, event ):
if event.string.strip() != "" or event.keyval == Gdk.KEY_BackSpace:
self.searchEntry.grab_focus()
gtk.gtk_editable_set_position(hash(self.searchEntry), -1)
self.searchEntry.event( event )
return True