[Libreoffice-commits] core.git: vcl/unx

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Feb 3 17:05:49 UTC 2020


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

New commits:
commit 09fdcd6b67524d2f3ef410f40953c46d42b83e36
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Feb 3 14:33:54 2020 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Feb 3 18:05:09 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>

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 0c4fecab4818..871ce8240e4d 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();
         }
     }
 
@@ -9001,6 +9009,8 @@ public:
         for (auto& a : m_aSensitiveMap)
             a.second = nIndex++;
 
+        ensure_drag_begin_end();
+
         GtkTreeModel *pModel = GTK_TREE_MODEL(m_pTreeStore);
         m_nRowDeletedSignalId = g_signal_connect(pModel, "row-deleted", G_CALLBACK(signalRowDeleted), this);
         m_nRowInsertedSignalId = g_signal_connect(pModel, "row-inserted", G_CALLBACK(signalRowInserted), this);


More information about the Libreoffice-commits mailing list