gdk: Convert mouse position to doubles, add new getters

We've long had double precision mouse coordinates on wayland (e.g.
when rotating a window) but with the new scaling we even have it on
X (and, its also in Xinput2), so convert all the internal mouse/device
position getters to use doubles and add new accessors for the
public APIs that take doubles instead of ints.
This commit is contained in:
Alexander Larsson
2013-07-03 11:52:58 +02:00
parent 867ba1df27
commit e8b38fedbd
23 changed files with 387 additions and 253 deletions

View File

@ -47,10 +47,10 @@ static void gdk_device_win32_query_state (GdkDevice *device,
GdkWindow *window,
GdkWindow **root_window,
GdkWindow **child_window,
gint *root_x,
gint *root_y,
gint *win_x,
gint *win_y,
gdouble *root_x,
gdouble *root_y,
gdouble *win_x,
gdouble *win_y,
GdkModifierType *mask);
static GdkGrabStatus gdk_device_win32_grab (GdkDevice *device,
GdkWindow *window,
@ -62,8 +62,8 @@ static GdkGrabStatus gdk_device_win32_grab (GdkDevice *device,
static void gdk_device_win32_ungrab (GdkDevice *device,
guint32 time_);
static GdkWindow * gdk_device_win32_window_at_position (GdkDevice *device,
gint *win_x,
gint *win_y,
gdouble *win_x,
gdouble *win_y,
GdkModifierType *mask,
gboolean get_toplevel);
static void gdk_device_win32_select_window_events (GdkDevice *device,
@ -138,8 +138,8 @@ gdk_device_win32_set_window_cursor (GdkDevice *device,
static void
gdk_device_win32_warp (GdkDevice *device,
GdkScreen *screen,
gint x,
gint y)
gdouble x,
gdouble y)
{
}
@ -174,10 +174,10 @@ gdk_device_win32_query_state (GdkDevice *device,
GdkWindow *window,
GdkWindow **root_window,
GdkWindow **child_window,
gint *root_x,
gint *root_y,
gint *win_x,
gint *win_y,
gdouble *root_x,
gdouble *root_y,
gdouble *win_x,
gdouble *win_y,
GdkModifierType *mask)
{
POINT point;
@ -259,8 +259,8 @@ screen_to_client (HWND hwnd, POINT screen_pt, POINT *client_pt)
static GdkWindow *
gdk_device_win32_window_at_position (GdkDevice *device,
gint *win_x,
gint *win_y,
gdouble *win_x,
gdouble *win_y,
GdkModifierType *mask,
gboolean get_toplevel)
{