[gtk+/gtk-3-22] Don't place dnd cursor in placeholder text



commit 7d23b33ac51c72eaaf7640f8cb0c31b00bf7deff
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Dec 17 10:52:33 2017 -0500

    Don't place dnd cursor in placeholder text
    
    That is just misleading - the entire placeholder text is going
    to be replaced by the drop.

 gtk/gtkentry.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 8f3aa8e..a29a207 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -10029,8 +10029,11 @@ gtk_entry_drag_motion (GtkWidget        *widget,
       priv->dnd_position = -1;
     }
 
+  if (show_placeholder_text (entry))
+    priv->dnd_position = -1;
+
   gdk_drag_status (context, suggested_action, time);
-  if (priv->dnd_position == -1)
+  if (suggested_action == 0)
     gtk_drag_unhighlight (widget);
   else
     gtk_drag_highlight (widget);


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