vcl/unx/gtk3/gtk3gtkinst.cxx |   20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

New commits:
commit 8e5a43223ce421643213e6542c6a971b6164f6aa
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Fri Apr 17 09:21:52 2020 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Fri Apr 17 11:46:46 2020 +0200

    turn off hover selection until mouse is moved
    
    which solves in a simpler and better way the problem under wayland where I 
see
    that the cursor pos in super long treeview menus ends up in the wrong place
    
    Change-Id: If9c7e26c3858ef00bc1fbf26319d859ff529db44
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92403
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 0ab70cdb8500..eeed79fc7883 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -12800,6 +12800,14 @@ private:
     {
         if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(m_pToggleButton)))
         {
+            if (m_bHoverSelection)
+            {
+                // turn hover selection back off until mouse is moved again
+                // *after* menu is shown again
+                gtk_tree_view_set_hover_selection(m_pTreeView, false);
+                m_bHoverSelection = false;
+            }
+
             do_ungrab(GTK_WIDGET(m_pMenuWindow));
 
             gtk_widget_hide(GTK_WIDGET(m_pMenuWindow));
@@ -12833,18 +12841,6 @@ private:
 
             m_bActivateCalled = false;
             show_menu(pComboBox, m_pMenuWindow);
-
-            // under wayland I see that the cursor pos in super
-            // long treeview menus ends up in the wrong place
-            // but letting all pending events get processed
-            // before enabling hover selection solve it
-            Scheduler::ProcessEventsToIdle();
-
-            if (!m_bHoverSelection)
-            {
-                gtk_tree_view_set_hover_selection(m_pTreeView, true);
-                m_bHoverSelection = true;
-            }
         }
     }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to