diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-10-12 10:12:56 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-10-12 15:28:35 +0200 |
commit | f3692a9260f6f51be89f460ec9cb3bd517952b95 (patch) | |
tree | df3641256809855cc9b5f8cd495acec6056b0f0d /vcl | |
parent | 43365359a817c85d6d7e138b1cc773352ebb6e07 (diff) |
similar to tdf#120764 dismiss tooltips on showing popup menu
Change-Id: I4a3dd3d30fcab84bf9987f71a9c9cf0657ecfbb6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104210
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/gtk3/gtk3gtksalmenu.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/vcl/unx/gtk3/gtk3gtksalmenu.cxx b/vcl/unx/gtk3/gtk3gtksalmenu.cxx index 94e2134e151a..9c02cf50e329 100644 --- a/vcl/unx/gtk3/gtk3gtksalmenu.cxx +++ b/vcl/unx/gtk3/gtk3gtksalmenu.cxx @@ -433,6 +433,16 @@ bool GtkSalMenu::ShowNativePopupMenu(FloatingWindow* pWin, const tools::Rectangl GMainLoop* pLoop = g_main_loop_new(nullptr, true); g_signal_connect_swapped(G_OBJECT(pWidget), "deactivate", G_CALLBACK(g_main_loop_quit), pLoop); + + // tdf#120764 It isn't allowed under wayland to have two visible popups that share + // the same top level parent. The problem is that since gtk 3.24 tooltips are also + // implemented as popups, which means that we cannot show any popup if there is a + // visible tooltip. + // hide any current tooltip + mpFrame->HideTooltip(); + // don't allow any more to appear until menu is dismissed + mpFrame->BlockTooltip(); + #if GTK_CHECK_VERSION(3,22,0) if (gtk_check_version(3, 22, 0) == nullptr) { @@ -509,6 +519,9 @@ bool GtkSalMenu::ShowNativePopupMenu(FloatingWindow* pWin, const tools::Rectangl g_object_unref(mpActionGroup); ClearActionGroupAndMenuModel(); + // undo tooltip blocking + mpFrame->UnblockTooltip(); + mpFrame = nullptr; return true; |