diff options
author | Owen Taylor <otaylor@redhat.com> | 1999-01-15 15:58:17 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 1999-01-15 15:58:17 +0000 |
commit | 3bba8439685024f9fbfd9d1880da95f4cd9ce09f (patch) | |
tree | ee016b89559e66b09412940912744a296a3f84ff /gtk/gtkdnd.c | |
parent | eb7c4e4589d40766c785d13000ae76d567232a1b (diff) | |
download | gtk+-3bba8439685024f9fbfd9d1880da95f4cd9ce09f.tar.gz |
Make MOD1-drag also do action ask.
Thu Jan 14 11:29:53 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_get_event_action): Make
MOD1-drag also do action ask.
* gtk/gtkdnd.c (gtk_drag_button_release_cb): Send the
button-release event we simulate to get grabs released,
with a window of GDK_ROOT_PARENT instead of the actual
widget. This is a bad hack in some sense, but seems
to work nicely. (It's sort of like what you would
if you grabbed on button press, then the user
released outside of the widget.)
Diffstat (limited to 'gtk/gtkdnd.c')
-rw-r--r-- | gtk/gtkdnd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c index cd29c53d53..62af27d5d1 100644 --- a/gtk/gtkdnd.c +++ b/gtk/gtkdnd.c @@ -435,6 +435,9 @@ gtk_drag_get_event_action (GdkEvent *event, gint button, GdkDragAction actions) } else { + if (state & (GDK_MOD1_MASK)) + return GDK_ACTION_ASK; + if (actions & GDK_ACTION_COPY) return GDK_ACTION_COPY; else if (actions & GDK_ACTION_MOVE) @@ -2475,7 +2478,7 @@ gtk_drag_button_release_cb (GtkWidget *widget, */ send_event.button.type = GDK_BUTTON_RELEASE; - send_event.button.window = source_widget->window; + send_event.button.window = GDK_ROOT_PARENT (); send_event.button.send_event = TRUE; send_event.button.time = event->time; send_event.button.x = 0; |