[gtk/dnd-fixes: 1/3] dnd: Add another assertion




commit c8ad4d5debc48e8d348cd704a6c5f1835536a71f
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Jun 19 07:49:04 2021 -0700

    dnd: Add another assertion
    
    Assert that gdk_drop_finish() is called after the
    drop is performed.

 gdk/gdkdrop.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gdk/gdkdrop.c b/gdk/gdkdrop.c
index 0825df69d2..37a63c5a7b 100644
--- a/gdk/gdkdrop.c
+++ b/gdk/gdkdrop.c
@@ -294,8 +294,11 @@ gdk_drop_finalize (GObject *object)
 
   /* someone forgot to send a LEAVE signal */
   g_warn_if_fail (!priv->entered);
+
   /* Should we emit finish() here if necessary?
-   * For now that's the backends' job */
+   * For now that's the backends' job
+   */
+  g_warn_if_fail (priv->state != GDK_DROP_STATE_DROPPING);
 
   g_clear_object (&priv->device);
   g_clear_object (&priv->drag);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]