diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-05-23 10:54:58 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-05-23 17:32:19 +0200 |
commit | 8b7f8f54a8ee35df98f8107a42981d3a0a659541 (patch) | |
tree | 6610ea0b4dd48a8a26afa6e259bd6b14b6895762 /vcl/unx | |
parent | c2950d74b1a641ae45171143b5ea2b8acd4b0169 (diff) |
MouseRelease is expected to have n-clicks of last MousePress
otherwise the IMapWnd and CountourWindow don't accept the double-click
release as finishing polygon editing
Change-Id: Iaab7a46cad2c5c92fdc2f8ff61135792fae67be8
Reviewed-on: https://gerrit.libreoffice.org/72830
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index fa98e2e2e208..5a51f7074373 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -1380,6 +1380,7 @@ private: bool m_bFrozen; bool m_bDraggedOver; sal_uInt16 m_nLastMouseButton; + sal_uInt16 m_nLastMouseClicks; gulong m_nFocusInSignalId; gulong m_nMnemonicActivateSignalId; gulong m_nFocusOutSignalId; @@ -1431,8 +1432,6 @@ private: bool signal_button(GdkEventButton* pEvent) { - int nClicks = 1; - SalEvent nEventType = SalEvent::NONE; switch (pEvent->type) { @@ -1448,13 +1447,14 @@ private: } } nEventType = SalEvent::MouseButtonDown; + m_nLastMouseClicks = 1; break; case GDK_2BUTTON_PRESS: - nClicks = 2; + m_nLastMouseClicks = 2; nEventType = SalEvent::MouseButtonDown; break; case GDK_3BUTTON_PRESS: - nClicks = 3; + m_nLastMouseClicks = 3; nEventType = SalEvent::MouseButtonDown; break; case GDK_BUTTON_RELEASE: @@ -1493,7 +1493,7 @@ private: sal_uInt32 nModCode = GtkSalFrame::GetMouseModCode(pEvent->state); sal_uInt16 nCode = m_nLastMouseButton | (nModCode & (KEY_SHIFT | KEY_MOD1 | KEY_MOD2)); - MouseEvent aMEvt(aPos, nClicks, ImplGetMouseButtonMode(m_nLastMouseButton, nModCode), nCode, nCode); + MouseEvent aMEvt(aPos, m_nLastMouseClicks, ImplGetMouseButtonMode(m_nLastMouseButton, nModCode), nCode, nCode); if (nEventType == SalEvent::MouseButtonDown) { @@ -1581,6 +1581,7 @@ public: , m_bFrozen(false) , m_bDraggedOver(false) , m_nLastMouseButton(0) + , m_nLastMouseClicks(0) , m_nFocusInSignalId(0) , m_nMnemonicActivateSignalId(0) , m_nFocusOutSignalId(0) |