mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 14:10:30 +00:00
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.)
This commit is contained in:
parent
eb7c4e4589
commit
3bba843968
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user