vcl/source/app/salvtables.cxx | 2 ++ vcl/unx/gtk3/gtkinst.cxx | 3 +++ 2 files changed, 5 insertions(+)
New commits: commit f3d85930ead7e62225646a992dbd22af822122af Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Mon Aug 28 09:11:15 2023 +0100 Commit: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> CommitDate: Tue Sep 5 15:54:46 2023 +0200 Related: tdf#144906 unset g_DragSource if drag end callback never called a scenario I can reproduce with alt+f4 while dragging from the navigator Change-Id: I7123602e036fbe15e0ae8f9a7e1d5fc7483dc6c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156137 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> Tested-by: Jenkins (cherry picked from commit 5431abc55c5e02cf6a0f68b8ce40826d85e43006) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156379 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index b16b0930ab00..8f349fd39b15 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -5147,6 +5147,8 @@ SalInstanceTreeView::~SalInstanceTreeView() static_cast<LclTabListBox&>(*m_xTreeView).SetStartDragHdl(Link<SvTreeListBox*, bool>()); static_cast<LclTabListBox&>(*m_xTreeView).SetModelChangedHdl(Link<SvTreeListBox*, void>()); } + if (g_DragSource == this) + g_DragSource = nullptr; m_xTreeView->SetPopupMenuHdl(Link<const CommandEvent&, bool>()); m_xTreeView->SetExpandingHdl(Link<SvTreeListBox*, bool>()); m_xTreeView->SetDoubleClickHdl(Link<SvTreeListBox*, bool>()); diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 77d69b9a4436..5920480e5eaa 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -16757,6 +16757,9 @@ public: g_signal_handler_disconnect(m_pTreeView, m_nRowActivatedSignalId); g_signal_handler_disconnect(gtk_tree_view_get_selection(m_pTreeView), m_nChangedSignalId); + if (g_DragSource == this) + g_DragSource = nullptr; + GValue value = G_VALUE_INIT; g_value_init(&value, G_TYPE_POINTER); g_value_set_pointer(&value, static_cast<gpointer>(nullptr));