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:
Owen Taylor 1999-01-15 15:58:17 +00:00 committed by Owen Taylor
parent eb7c4e4589
commit 3bba843968

View File

@ -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;