vcl/source/app/salvtables.cxx | 2 ++ vcl/unx/gtk3/gtkinst.cxx | 3 +++ 2 files changed, 5 insertions(+)
New commits: commit df3b95a39472e18ea8acdaae447b7176e37a9256 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 12:21:40 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/+/156182 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 91c96ed4986a..780c6baae79e 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -5126,6 +5126,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 141039dfb79c..087f2ef186ec 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -16768,6 +16768,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));