diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-04-17 09:21:52 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-04-17 11:46:46 +0200 |
commit | 8e5a43223ce421643213e6542c6a971b6164f6aa (patch) | |
tree | 3843ec0b91bc4880f4591c1edc61a558e493dedf /vcl/unx | |
parent | 73a382d6ab146c49c11b86e6b6bbef3f2044cccf (diff) |
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 <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 20 |
1 files changed, 8 insertions, 12 deletions
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; - } } } |