diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-01-19 11:13:50 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-01-19 14:03:30 +0000 |
commit | 2f901e483b5ab029a2f809acb68b49aafa2c77c3 (patch) | |
tree | f4fdd791090b0f5d68d70ecdf3a2c75ec01d4f69 /vcl | |
parent | a7a842f4a437216cba8cd623306506aa30db7d8e (diff) |
save last mouse press location even if no handlers set
Change-Id: I24ce412fd3b62843ee3fabc7a3fca36ae91c0222
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145784
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/gtk3/gtkinst.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 6b658d24fae7..90055b3ecc57 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -3010,6 +3010,14 @@ private: return true; } + /* Save press to possibly begin a drag */ + if (pEvent->type != GDK_BUTTON_RELEASE) + { + m_nPressedButton = pEvent->button; + m_nPressStartX = pEvent->x; + m_nPressStartY = pEvent->y; + } + if (!m_aMousePressHdl.IsSet() && !m_aMouseReleaseHdl.IsSet()) return false; @@ -3060,14 +3068,6 @@ private: return false; } - /* Save press to possibly begin a drag */ - if (pEvent->type != GDK_BUTTON_RELEASE) - { - m_nPressedButton = pEvent->button; - m_nPressStartX = pEvent->x; - m_nPressStartY = pEvent->y; - } - sal_uInt32 nModCode = GtkSalFrame::GetMouseModCode(pEvent->state); // strip out which buttons are involved from the nModCode and replace with m_nLastMouseButton sal_uInt16 nCode = m_nLastMouseButton | (nModCode & (KEY_SHIFT | KEY_MOD1 | KEY_MOD2)); |