summaryrefslogtreecommitdiffstats
path: root/platform/linuxbsd/wayland/wayland_thread.h
diff options
context:
space:
mode:
authorRiteo <riteo@posteo.net>2024-07-07 08:59:13 +0200
committerRiteo <riteo@posteo.net>2024-07-07 09:07:29 +0200
commit2ff50119dc8dc98ae656a672a62e7dc855a3ba0c (patch)
tree0abfa354bbd78cbb7efde50ba88756ad84fbff3a /platform/linuxbsd/wayland/wayland_thread.h
parentb97110cd307e4d78e20bfafe5de6c082194b2cd6 (diff)
downloadredot-engine-2ff50119dc8dc98ae656a672a62e7dc855a3ba0c.tar.gz
Wayland: switch pointer position handling to doubles
This reduces even further the amount of work we have to do when scaling and potentially improves input accuracy as now the input code is free from any form of rounding.
Diffstat (limited to 'platform/linuxbsd/wayland/wayland_thread.h')
-rw-r--r--platform/linuxbsd/wayland/wayland_thread.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/platform/linuxbsd/wayland/wayland_thread.h b/platform/linuxbsd/wayland/wayland_thread.h
index 775ca71346..6fd7a60966 100644
--- a/platform/linuxbsd/wayland/wayland_thread.h
+++ b/platform/linuxbsd/wayland/wayland_thread.h
@@ -295,7 +295,7 @@ public:
};
struct PointerData {
- Point2i position;
+ Point2 position;
uint32_t motion_time = 0;
// Relative motion has its own optional event and so needs its own time.
@@ -305,7 +305,7 @@ public:
BitField<MouseButtonMask> pressed_button_mask;
MouseButton last_button_pressed = MouseButton::NONE;
- Point2i last_pressed_position;
+ Point2 last_pressed_position;
// This is needed to check for a new double click every time.
bool double_click_begun = false;
@@ -325,14 +325,14 @@ public:
};
struct TabletToolData {
- Point2i position;
+ Point2 position;
Vector2 tilt;
uint32_t pressure = 0;
BitField<MouseButtonMask> pressed_button_mask;
MouseButton last_button_pressed = MouseButton::NONE;
- Point2i last_pressed_position;
+ Point2 last_pressed_position;
bool double_click_begun = false;