mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
gdk: Fix coordinates in dnd events
Don't store coordinates as shorts. Use doubles, as everywhere else. Also add x, y in addition to x_root, y_root, and actually return those in gdk_event_get_coords.
This commit is contained in:
parent
772ac2b0c5
commit
677c4b140c
@ -947,6 +947,13 @@ gdk_event_get_coords (const GdkEvent *event,
|
||||
x = event->touchpad_pinch.x;
|
||||
y = event->touchpad_pinch.y;
|
||||
break;
|
||||
case GDK_DRAG_ENTER:
|
||||
case GDK_DRAG_LEAVE:
|
||||
case GDK_DRAG_MOTION:
|
||||
case GDK_DROP_START:
|
||||
x = event->dnd.x;
|
||||
y = event->dnd.y;
|
||||
break;
|
||||
default:
|
||||
fetched = FALSE;
|
||||
break;
|
||||
|
@ -418,7 +418,9 @@ struct _GdkEventDND {
|
||||
GdkDrop *drop;
|
||||
|
||||
guint32 time;
|
||||
gshort x_root, y_root;
|
||||
double x_root, y_root;
|
||||
double x;
|
||||
double y;
|
||||
};
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user