diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-07-25 20:49:05 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-07-27 12:05:42 +0200 |
commit | 1d1ea369da6e027b1ed1453584233f0f7cdcf223 (patch) | |
tree | 9b265dc38f21b2c8b05e43aa925c93d10beb4cc6 /vcl/unx | |
parent | 06fd06597796d9e92117602245f3968c93707708 (diff) |
A GtkButton is already sufficient to get mouse events
Change-Id: Ia61a7906198bf6b6a4ce188d7de9a627c8540af4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99450
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 003af767ca65..e9c7dab0b0e0 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -1929,7 +1929,7 @@ protected: m_aFocusOutHdl.Call(*this); } - void ensureMouseEventWidget() + virtual void ensureMouseEventWidget() { if (!m_pMouseEventBox) m_pMouseEventBox = ::ensureEventWidget(m_pWidget); @@ -6662,6 +6662,13 @@ private: pThis->signal_clicked(); } + virtual void ensureMouseEventWidget() override + { + // The GtkButton is sufficient to get mouse events without an intermediate GtkEventBox + if (!m_pMouseEventBox) + m_pMouseEventBox = m_pWidget; + } + public: GtkInstanceButton(GtkButton* pButton, GtkInstanceBuilder* pBuilder, bool bTakeOwnership) : GtkInstanceContainer(GTK_CONTAINER(pButton), pBuilder, bTakeOwnership) |