[Libreoffice-commits] core.git: 2 commits - svx/source vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Oct 12 13:29:38 UTC 2020
svx/source/dialog/weldeditview.cxx | 5 +++++
vcl/unx/gtk3/gtk3gtksalmenu.cxx | 13 +++++++++++++
2 files changed, 18 insertions(+)
New commits:
commit 3a5808f5e43f5e190b3f1c759563a951b5bb0d08
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Oct 12 10:48:49 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Oct 12 15:28:59 2020 +0200
CaptureMouse on mouse-down and ReleaseMouse on mouse-up
Change-Id: I6a2096151bbe7b2bdf9210b3d023926270a9987a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104211
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/svx/source/dialog/weldeditview.cxx b/svx/source/dialog/weldeditview.cxx
index 9d79d78c961c..e7d90fab15b8 100644
--- a/svx/source/dialog/weldeditview.cxx
+++ b/svx/source/dialog/weldeditview.cxx
@@ -132,6 +132,9 @@ bool WeldEditView::MouseMove(const MouseEvent& rMEvt)
bool WeldEditView::MouseButtonDown(const MouseEvent& rMEvt)
{
+ if (!IsMouseCaptured())
+ CaptureMouse();
+
if (!HasFocus())
{
GrabFocus();
@@ -143,6 +146,8 @@ bool WeldEditView::MouseButtonDown(const MouseEvent& rMEvt)
bool WeldEditView::MouseButtonUp(const MouseEvent& rMEvt)
{
+ if (IsMouseCaptured())
+ ReleaseMouse();
return m_xEditView && m_xEditView->MouseButtonUp(rMEvt);
}
commit f3692a9260f6f51be89f460ec9cb3bd517952b95
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Oct 12 10:12:56 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Oct 12 15:28:35 2020 +0200
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 at redhat.com>
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;
More information about the Libreoffice-commits
mailing list