[Libreoffice-commits] core.git: vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jun 24 19:40:42 UTC 2021
vcl/unx/gtk3/gtkframe.cxx | 35 +----------------------------------
1 file changed, 1 insertion(+), 34 deletions(-)
New commits:
commit af77818e8a37eb53fa868250366a44327b63b406
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Jun 24 08:45:07 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Jun 24 21:39:47 2021 +0200
gtk4: simplify dnd "drop" signal
Change-Id: I2d4714194516c6b8270fa96c8c5a6b75d2d10b86
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117760
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index a500af13a0d4..ffc934687344 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -4492,45 +4492,12 @@ GtkInstDragSource* GtkInstDragSource::g_ActiveDragSource;
#if GTK_CHECK_VERSION(4, 0, 0)
-struct GrabBag
-{
- GtkInstDropTarget* m_pDropTarget;
- GtkDropTargetAsync* m_pContext;
- GdkDrop* m_pDrop;
- double m_nX;
- double m_nY;
-
- GrabBag(GtkInstDropTarget* pDropTarget,
- GtkDropTargetAsync* pContext,
- GdkDrop* pDrop,
- double nX,
- double nY)
- : m_pDropTarget(pDropTarget)
- , m_pContext(pContext)
- , m_pDrop(pDrop)
- , m_nX(nX)
- , m_nY(nY)
- {
- }
-};
-
-static gboolean lcl_deferred_dragDrop(gpointer user_data)
-{
- GrabBag* pGrabBag = static_cast<GrabBag*>(user_data);
- pGrabBag->m_pDropTarget->signalDragDrop(pGrabBag->m_pContext, pGrabBag->m_pDrop, pGrabBag->m_nX, pGrabBag->m_nY);
- g_object_unref(pGrabBag->m_pDrop);
- return false;
-}
-
gboolean GtkSalFrame::signalDragDrop(GtkDropTargetAsync* context, GdkDrop* drop, double x, double y, gpointer frame)
{
GtkSalFrame* pThis = static_cast<GtkSalFrame*>(frame);
if (!pThis->m_pDropTarget)
return false;
- g_object_ref(drop);
- g_idle_add(lcl_deferred_dragDrop, new GrabBag(pThis->m_pDropTarget, context, drop, x, y));
-// return pThis->m_pDropTarget->signalDragDrop(context, drop, x, y);
- return true;
+ return pThis->m_pDropTarget->signalDragDrop(context, drop, x, y);
}
#else
gboolean GtkSalFrame::signalDragDrop(GtkWidget* pWidget, GdkDragContext* context, gint x, gint y, guint time, gpointer frame)
More information about the Libreoffice-commits
mailing list