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:
Matthias Clasen 2019-12-30 11:56:49 -05:00
parent 772ac2b0c5
commit 677c4b140c
2 changed files with 10 additions and 1 deletions

View File

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

View File

@ -418,7 +418,9 @@ struct _GdkEventDND {
GdkDrop *drop;
guint32 time;
gshort x_root, y_root;
double x_root, y_root;
double x;
double y;
};
/*