[Libreoffice-commits] core.git: vcl/source vcl/unx
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jul 3 05:40:31 UTC 2020
vcl/source/app/customweld.cxx | 2 +-
vcl/unx/gtk3/gtk3gtkinst.cxx | 12 ++++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
New commits:
commit f7b2e98bb76d2ce37ddc886ab503c6b160d8849d
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: Fri Jul 3 07:39:49 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>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97743
Tested-by: Jenkins
diff --git a/vcl/source/app/customweld.cxx b/vcl/source/app/customweld.cxx
index 07dc7935b198..e8ce7003532a 100644
--- a/vcl/source/app/customweld.cxx
+++ b/vcl/source/app/customweld.cxx
@@ -25,6 +25,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));
@@ -37,7 +38,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 0959bb53421e..9791b7f28cc2 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -12761,6 +12761,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