summaryrefslogtreecommitdiff
path: root/gtk/gtkdnd.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2007-04-28 15:34:39 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2007-04-28 15:34:39 +0000
commit065d1560e603642e5dc5cfd094d31f28d941bbb8 (patch)
treef07198851a27471f50e1a2b0478587e02d5aa130 /gtk/gtkdnd.c
parent2dcdcfe4df5fa93ebb202a0fa2e61a5a8535b4cd (diff)
downloadgtk+-065d1560e603642e5dc5cfd094d31f28d941bbb8.tar.gz
Add GTK_TARGET_OTHER_{APP,WIDGET} to restrict drags within an
2007-04-28 Matthias Clasen <mclasen@redhat.com> * gtk/gtkdnd.[hc]: Add GTK_TARGET_OTHER_{APP,WIDGET} to restrict drags within an application/widget. (#163141, Jorn Baayen) svn path=/trunk/; revision=17676
Diffstat (limited to 'gtk/gtkdnd.c')
-rw-r--r--gtk/gtkdnd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index e227b69477..31d1d9233e 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -1520,7 +1520,9 @@ gtk_drag_dest_find_target (GtkWidget *widget,
if (tmp_source->data == GUINT_TO_POINTER (pair->target))
{
if ((!(pair->flags & GTK_TARGET_SAME_APP) || source_widget) &&
- (!(pair->flags & GTK_TARGET_SAME_WIDGET) || (source_widget == widget)))
+ (!(pair->flags & GTK_TARGET_SAME_WIDGET) || (source_widget == widget)) &&
+ (!(pair->flags & GTK_TARGET_OTHER_APP) || !source_widget) &&
+ (!(pair->flags & GTK_TARGET_OTHER_WIDGET) || (source_widget != widget)))
return pair->target;
else
break;