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 3514547a79bffdf663308182836f5537bfa402ac
Author: Graeme Gott <[email protected]>
Date:   Wed Dec 25 11:59:36 2019 -0500

    Fix recent icon view not scrolling to top.
---
 panel-plugin/page.cpp | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/panel-plugin/page.cpp b/panel-plugin/page.cpp
index ef59fca..c631df1 100644
--- a/panel-plugin/page.cpp
+++ b/panel-plugin/page.cpp
@@ -67,16 +67,22 @@ void Page::reset_selection()
 {
        m_view->collapse_all();
 
-       // Clear selection and scroll to top
+       // Set keyboard focus on first item
        GtkTreeModel* model = m_view->get_model();
        GtkTreeIter iter;
        if (model && gtk_tree_model_get_iter_first(model, &iter))
        {
                GtkTreePath* path = gtk_tree_model_get_path(model, &iter);
-               get_view()->scroll_to_path(path);
-               get_view()->set_cursor(path);
+               m_view->set_cursor(path);
                gtk_tree_path_free(path);
        }
+
+       // Scroll to top
+       GtkAdjustment* adjustment = 
gtk_scrollable_get_vadjustment(GTK_SCROLLABLE(m_view->get_widget()));
+       gtk_adjustment_set_value(adjustment, 
gtk_adjustment_get_lower(adjustment));
+
+       // Clear selection
+       m_view->clear_selection();
 }
 
 //-----------------------------------------------------------------------------

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
Xfce4-commits mailing list
[email protected]
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to