vcl/source/app/salvtables.cxx | 2 ++ vcl/unx/gtk3/gtkinst.cxx | 3 +++ 2 files changed, 5 insertions(+)
New commits: commit a0001a031ebb8a4c57b5c4591482cdd946a5a20d Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Mon Aug 28 09:11:15 2023 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Mon Aug 28 18:06:01 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/+/156139 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 91c6d1b0250f..b577a64862f2 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -5081,6 +5081,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 428f0f5ae357..17bbfe5d497e 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -16720,6 +16720,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));