summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2015-12-02 23:50:03 -0500
committerMatthias Clasen <mclasen@redhat.com>2015-12-02 23:52:55 -0500
commit058dfb07233e54a2372404b91fbc0b792f6483e2 (patch)
tree977e4c6bb6276e3e0aa249b9d7a1700d7de00633 /gtk
parent0b9136842d92456a921d5d2c4d69c07fa60e0ee8 (diff)
downloadgtk+-058dfb07233e54a2372404b91fbc0b792f6483e2.tar.gz
entry: Use regular drag highlight
The entry code passes GTK_DEST_DEFAULT_HIGHLIGHT when setting up the drop target, but that is ineffective because of the custom drag_motion implementation. Instead, call gtk_drag_[un]hightlight ourselves.
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkentry.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 68704532e5..f2fe2ddf4b 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -2697,9 +2697,7 @@ gtk_entry_init (GtkEntry *entry)
priv->progress_fraction = 0.0;
priv->progress_pulse_fraction = 0.1;
- gtk_drag_dest_set (GTK_WIDGET (entry),
- GTK_DEST_DEFAULT_HIGHLIGHT,
- NULL, 0,
+ gtk_drag_dest_set (GTK_WIDGET (entry), 0, NULL, 0,
GDK_ACTION_COPY | GDK_ACTION_MOVE);
gtk_drag_dest_add_text_targets (GTK_WIDGET (entry));
@@ -10109,6 +10107,7 @@ gtk_entry_drag_leave (GtkWidget *widget,
GtkEntry *entry = GTK_ENTRY (widget);
GtkEntryPrivate *priv = entry->priv;
+ gtk_drag_unhighlight (widget);
priv->dnd_position = -1;
gtk_widget_queue_draw (widget);
}
@@ -10202,8 +10201,12 @@ gtk_entry_drag_motion (GtkWidget *widget,
suggested_action = 0;
priv->dnd_position = -1;
}
-
+
gdk_drag_status (context, suggested_action, time);
+ if (priv->dnd_position == -1)
+ gtk_drag_unhighlight (widget);
+ else
+ gtk_drag_highlight (widget);
if (priv->dnd_position != old_position)
gtk_widget_queue_draw (widget);