[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/unx

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sat Dec 19 16:55:17 UTC 2020


 vcl/unx/gtk3/gtk3gtkinst.cxx |   14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

New commits:
commit bd2701b47886dfaabb3a01329f6930d6fb83f50b
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Feb 3 14:33:54 2020 +0000
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Sat Dec 19 17:54:45 2020 +0100

    Resolves: tdf#130347 we always need the drag-begin signal in GtkTreeView
    
    Change-Id: Icbd8ab1393e25b698b034341b526b3a55251610d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87876
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108027
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 8223c1235f77..b51534a45cef 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -1933,6 +1933,14 @@ protected:
             m_nKeyPressSignalId = g_signal_connect(m_pWidget, "key-press-event", G_CALLBACK(signalKey), this);
     }
 
+    void ensure_drag_begin_end()
+    {
+        if (!m_nDragBeginSignalId)
+            m_nDragBeginSignalId = g_signal_connect(m_pWidget, "drag-begin", G_CALLBACK(signalDragBegin), this);
+        if (!m_nDragEndSignalId)
+            m_nDragEndSignalId = g_signal_connect(m_pWidget, "drag-end", G_CALLBACK(signalDragEnd), this);
+    }
+
 private:
     bool m_bTakeOwnership;
     bool m_bFrozen;
@@ -2211,8 +2219,8 @@ private:
             m_nDragFailedSignalId = g_signal_connect(m_pWidget, "drag-failed", G_CALLBACK(signalDragFailed), this);
             m_nDragDataDeleteignalId = g_signal_connect(m_pWidget, "drag-data-delete", G_CALLBACK(signalDragDelete), this);
             m_nDragGetSignalId = g_signal_connect(m_pWidget, "drag-data-get", G_CALLBACK(signalDragDataGet), this);
-            m_nDragBeginSignalId = g_signal_connect(m_pWidget, "drag-begin", G_CALLBACK(signalDragBegin), this);
-            m_nDragEndSignalId = g_signal_connect(m_pWidget, "drag-end", G_CALLBACK(signalDragEnd), this);
+
+            ensure_drag_begin_end();
         }
     }
 
@@ -9078,6 +9086,8 @@ public:
         for (auto& a : m_aAlignMap)
             a.second = nIndex++;
 
+        ensure_drag_begin_end();
+
         m_nRowDeletedSignalId = g_signal_connect(m_pTreeModel, "row-deleted", G_CALLBACK(signalRowDeleted), this);
         m_nRowInsertedSignalId = g_signal_connect(m_pTreeModel, "row-inserted", G_CALLBACK(signalRowInserted), this);
     }


More information about the Libreoffice-commits mailing list