forked from AuroraMiddleware/gtk
gdk: Stop using gdk_device_get_position
We should always use the double variant of this api.
This commit is contained in:
parent
21580309d3
commit
8dece0e940
@ -1717,6 +1717,7 @@ _gdk_win32_surface_drag_begin (GdkSurface *surface,
|
||||
GdkDrag *drag;
|
||||
GdkWin32Drag *drag_win32;
|
||||
GdkWin32Clipdrop *clipdrop = _gdk_win32_clipdrop_get ();
|
||||
double px, py;
|
||||
int x_root, y_root;
|
||||
|
||||
g_return_val_if_fail (surface != NULL, NULL);
|
||||
@ -1731,9 +1732,9 @@ _gdk_win32_surface_drag_begin (GdkSurface *surface,
|
||||
|
||||
GDK_NOTE (DND, g_print ("_gdk_win32_surface_drag_begin\n"));
|
||||
|
||||
gdk_device_get_position (device, &x_root, &y_root);
|
||||
x_root += dx;
|
||||
y_root += dy;
|
||||
gdk_device_get_position_double (device, &px, &px);
|
||||
x_root = round (px) + dx;
|
||||
y_root = round (py) + dy;
|
||||
|
||||
drag_win32->start_x = x_root;
|
||||
drag_win32->start_y = y_root;
|
||||
|
@ -2077,6 +2077,7 @@ _gdk_x11_surface_drag_begin (GdkSurface *surface,
|
||||
GdkX11Drag *x11_drag;
|
||||
GdkDrag *drag;
|
||||
GdkDisplay *display;
|
||||
double px, py;
|
||||
int x_root, y_root;
|
||||
Atom xselection;
|
||||
GdkSurface *ipc_surface;
|
||||
@ -2097,9 +2098,9 @@ _gdk_x11_surface_drag_begin (GdkSurface *surface,
|
||||
|
||||
precache_target_list (drag);
|
||||
|
||||
gdk_device_get_position (device, &x_root, &y_root);
|
||||
x_root += dx;
|
||||
y_root += dy;
|
||||
gdk_device_get_position_double (device, &px, &py);
|
||||
x_root = round (px) + dx;
|
||||
y_root = round (py) + dy;
|
||||
|
||||
x11_drag->start_x = x_root;
|
||||
x11_drag->start_y = y_root;
|
||||
|
Loading…
Reference in New Issue
Block a user