diff options
author | Alexander Larsson <alexl@redhat.com> | 2013-07-03 11:52:58 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2013-07-03 14:39:25 +0200 |
commit | e8b38fedbd8961df4aaaa75b122a06ddc68e75f2 (patch) | |
tree | f8543ff9715a6f480e1bc645268844455ed3df2e /gdk/win32/gdkdevice-virtual.c | |
parent | 867ba1df27b9ed27d2d3ed6d43b536484635da18 (diff) | |
download | gtk+-e8b38fedbd8961df4aaaa75b122a06ddc68e75f2.tar.gz |
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.
Diffstat (limited to 'gdk/win32/gdkdevice-virtual.c')
-rw-r--r-- | gdk/win32/gdkdevice-virtual.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/gdk/win32/gdkdevice-virtual.c b/gdk/win32/gdkdevice-virtual.c index 3a779dc5b2..028a8f5c51 100644 --- a/gdk/win32/gdkdevice-virtual.c +++ b/gdk/win32/gdkdevice-virtual.c @@ -47,10 +47,10 @@ static void gdk_device_virtual_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_virtual_grab (GdkDevice *device,
GdkWindow *window,
@@ -62,8 +62,8 @@ static GdkGrabStatus gdk_device_virtual_grab (GdkDevice *device, static void gdk_device_virtual_ungrab (GdkDevice *device,
guint32 time_);
static GdkWindow * gdk_device_virtual_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_virtual_select_window_events (GdkDevice *device,
@@ -245,10 +245,10 @@ gdk_device_virtual_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)
{
GdkDeviceVirtual *virtual = GDK_DEVICE_VIRTUAL (device);
@@ -342,8 +342,8 @@ screen_to_client (HWND hwnd, POINT screen_pt, POINT *client_pt) static GdkWindow *
gdk_device_virtual_window_at_position (GdkDevice *device,
- gint *win_x,
- gint *win_y,
+ gdouble *win_x,
+ gdouble *win_y,
GdkModifierType *mask,
gboolean get_toplevel)
{
|