vcl/unx/gtk3/gtk3gtkinst.cxx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
New commits: commit 07c2bfc895c7a4074cb0cdcb12fead7624fc6336 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Jun 2 17:19:49 2020 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Jun 2 20:58:24 2020 +0200 use pseudo keyevent we already have if gtk_get_current_event is null so gtk's desire for one can be satisfied Change-Id: I486331bdc1778f07c02d0249f239c8d14fc4f5e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95371 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 7e851797806c..a8e9b6c2b69f 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -7531,11 +7531,16 @@ public: // Send a keyboard event through gtk_main_do_event to toggle any active tooltip offs // before trying to launch the menu // https://gitlab.gnome.org/GNOME/gtk/issues/1785 - GdkEvent *event = GtkSalFrame::makeFakeKeyPress(pWidget); - gtk_main_do_event(event); - gdk_event_free(event); + GdkEvent *pKeyEvent = GtkSalFrame::makeFakeKeyPress(pWidget); + gtk_main_do_event(pKeyEvent); - gtk_menu_popup_at_rect(m_pMenu, gtk_widget_get_window(pWidget), &aRect, GDK_GRAVITY_NORTH_WEST, GDK_GRAVITY_NORTH_WEST, nullptr); + GdkEvent *pTriggerEvent = gtk_get_current_event(); + if (!pTriggerEvent) + pTriggerEvent = pKeyEvent; + + gtk_menu_popup_at_rect(m_pMenu, gtk_widget_get_window(pWidget), &aRect, GDK_GRAVITY_NORTH_WEST, GDK_GRAVITY_NORTH_WEST, pTriggerEvent); + + gdk_event_free(pKeyEvent); } else #else _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits