[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/source vcl/unx
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jul 1 07:40:43 UTC 2020
vcl/source/app/customweld.cxx | 2 +-
vcl/unx/gtk3/gtk3gtkinst.cxx | 12 ++++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
New commits:
commit 91768cd32c7ac0534afd2111a7eebc1681db2f80
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Wed Jul 1 09:02:17 2020 +0200
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Wed Jul 1 09:40:09 2020 +0200
gtk3: receive mouse events on drawing area
Change-Id: I35ec84c7e2e849625db7d628e1fa2e3807b3ef21
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97566
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/vcl/source/app/customweld.cxx b/vcl/source/app/customweld.cxx
index d6465ff289f5..8c48188de8f8 100644
--- a/vcl/source/app/customweld.cxx
+++ b/vcl/source/app/customweld.cxx
@@ -20,6 +20,7 @@ CustomWeld::CustomWeld(weld::Builder& rBuilder, const OString& rDrawingId,
rWidgetController.GetUITestFactory(),
&rWidgetController))
{
+ m_rWidgetController.SetDrawingArea(m_xDrawingArea.get());
m_xDrawingArea->connect_size_allocate(LINK(this, CustomWeld, DoResize));
m_xDrawingArea->connect_draw(LINK(this, CustomWeld, DoPaint));
m_xDrawingArea->connect_mouse_press(LINK(this, CustomWeld, DoMouseButtonDown));
@@ -32,7 +33,6 @@ CustomWeld::CustomWeld(weld::Builder& rBuilder, const OString& rDrawingId,
m_xDrawingArea->connect_style_updated(LINK(this, CustomWeld, DoStyleUpdated));
m_xDrawingArea->connect_command(LINK(this, CustomWeld, DoCommand));
m_xDrawingArea->connect_query_tooltip(LINK(this, CustomWeld, DoRequestHelp));
- m_rWidgetController.SetDrawingArea(m_xDrawingArea.get());
}
IMPL_LINK(CustomWeld, DoResize, const Size&, rSize, void)
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 3197e2bd033d..b2f5f1b72d9e 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -11032,6 +11032,18 @@ public:
return m_pAccessible;
}
+ virtual void connect_mouse_press(const Link<const MouseEvent&, bool>& rLink) override
+ {
+ gtk_widget_add_events(m_pWidget, GDK_BUTTON_PRESS_MASK);
+ GtkInstanceWidget::connect_mouse_press(rLink);
+ }
+
+ virtual void connect_mouse_release(const Link<const MouseEvent&, bool>& rLink) override
+ {
+ gtk_widget_add_events(m_pWidget, GDK_BUTTON_RELEASE_MASK);
+ GtkInstanceWidget::connect_mouse_release(rLink);
+ }
+
virtual void set_direction(bool bRTL) override
{
GtkInstanceWidget::set_direction(bRTL);
More information about the Libreoffice-commits
mailing list