diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-11-21 19:51:38 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-11-22 09:35:09 +0100 |
commit | 873e4d30e37a23da74b2bab7914196d1f0a9a772 (patch) | |
tree | 6a92b0aced62591beab443f966e0eae37b596343 | |
parent | e6b75a22dfbf81b6eca628384ae1c4bc499c50a3 (diff) |
gtk3: popover replacement for GtkMenuButton has to be modal
Change-Id: If1b18c4b39fbe82fd613ff0f62f0ff60fdaeeed8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125637
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | vcl/unx/gtk3/gtkinst.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index f9b73c07bfd0..fc99f0986de7 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -10315,17 +10315,14 @@ public: { m_pMenuHack = GTK_WINDOW(gtk_window_new(GTK_WINDOW_POPUP)); gtk_window_set_type_hint(m_pMenuHack, GDK_WINDOW_TYPE_HINT_COMBO); - bool bModal = gtk_popover_get_modal(GTK_POPOVER(m_pPopover)); - gtk_window_set_modal(m_pMenuHack, bModal); + // See writer "format, watermark" for true here. Can't interact with the replacement popover otherwise. + gtk_window_set_modal(m_pMenuHack, true); gtk_window_set_resizable(m_pMenuHack, false); m_nSignalId = g_signal_connect(GTK_TOGGLE_BUTTON(m_pMenuButton), "toggled", G_CALLBACK(signalMenuButtonToggled), this); g_signal_connect(m_pMenuHack, "key-press-event", G_CALLBACK(keyPress), this); - if (bModal) - { - g_signal_connect(m_pMenuHack, "grab-broken-event", G_CALLBACK(signalGrabBroken), this); - g_signal_connect(m_pMenuHack, "button-press-event", G_CALLBACK(signalButtonPress), this); - g_signal_connect(m_pMenuHack, "button-release-event", G_CALLBACK(signalButtonRelease), this); - } + g_signal_connect(m_pMenuHack, "grab-broken-event", G_CALLBACK(signalGrabBroken), this); + g_signal_connect(m_pMenuHack, "button-press-event", G_CALLBACK(signalButtonPress), this); + g_signal_connect(m_pMenuHack, "button-release-event", G_CALLBACK(signalButtonRelease), this); } } #endif |