[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 45/473: Fix position being reset when scrolling with directional keys. Closes #7.
noreply at xfce.org
noreply at xfce.org
Mon Feb 16 23:53:35 CET 2015
This is an automated email from the git hooks/post-receive script.
gottcode pushed a commit to branch master
in repository panel-plugins/xfce4-whiskermenu-plugin.
commit 65fb61631bfac7f6c0e5b5c825562c3b2b86dc73
Author: Graeme Gott <graeme at gottcode.org>
Date: Sun Jun 30 15:13:42 2013 -0400
Fix position being reset when scrolling with directional keys. Closes #7.
---
src/menu.cpp | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/src/menu.cpp b/src/menu.cpp
index 418a058..ba1e3f3 100644
--- a/src/menu.cpp
+++ b/src/menu.cpp
@@ -520,24 +520,27 @@ gboolean Menu::on_key_press_event(GtkWidget* widget, GdkEventKey* event)
// Make up and down keys always scroll current list of applications
if ((event->keyval == GDK_KEY_Up) || (event->keyval == GDK_KEY_Down))
{
- GtkWidget* widget = NULL;
+ GtkWidget* view = NULL;
if (gtk_widget_get_visible(m_search_results->get_widget()))
{
- widget = m_search_results->get_view()->get_widget();
+ view = m_search_results->get_view()->get_widget();
}
else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(m_favorites_button)))
{
- widget = m_favorites->get_view()->get_widget();
+ view = m_favorites->get_view()->get_widget();
}
else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(m_recent_button)))
{
- widget = m_recent->get_view()->get_widget();
+ view = m_recent->get_view()->get_widget();
}
else
{
- widget = m_applications->get_view()->get_widget();
+ view = m_applications->get_view()->get_widget();
+ }
+ if (!gtk_widget_has_focus(view))
+ {
+ gtk_widget_grab_focus(view);
}
- gtk_widget_grab_focus(widget);
return false;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list