vcl/source/app/salvtables.cxx | 2 ++ vcl/unx/gtk3/gtkinst.cxx | 3 +++ 2 files changed, 5 insertions(+)
New commits: commit a2e8617140e924e33c2b157964244e12de508c91 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: Wed Aug 30 12:27:56 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/+/156138 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> Tested-by: Jenkins (cherry picked from commit 48e3c7c7b115c08af80752af8f7302447872300b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156148 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 63d77467bf28..e6f5abe9bc36 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -5228,6 +5228,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 dcc2e8632bb9..dcfae5690d8f 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -16714,6 +16714,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));