summaryrefslogtreecommitdiff
path: root/src/devices
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-12-15 23:54:05 +0000
committerVaxry <vaxry@vaxry.net>2024-12-15 23:54:14 +0000
commitde3ad245dcbcd42c88e9afc48264bdb8f2356c15 (patch)
treec3c47eaeb05eede32d246cbb53bcaf8031348ca4 /src/devices
parentdb249648776875ce3142141d0d3055e43ce606aa (diff)
input: add warp_back_after_non_mouse_input
adds cursor:warp_back_after_non_mouse_input fixes #8675
Diffstat (limited to 'src/devices')
-rw-r--r--src/devices/IPointer.hpp3
-rw-r--r--src/devices/Mouse.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/devices/IPointer.hpp b/src/devices/IPointer.hpp
index 503a690e..ea9cb9f4 100644
--- a/src/devices/IPointer.hpp
+++ b/src/devices/IPointer.hpp
@@ -19,6 +19,7 @@ class IPointer : public IHID {
struct SMotionEvent {
uint32_t timeMs = 0;
Vector2D delta, unaccel;
+ bool mouse = false;
};
struct SMotionAbsoluteEvent {
@@ -31,6 +32,7 @@ class IPointer : public IHID {
uint32_t timeMs = 0;
uint32_t button = 0;
wl_pointer_button_state state = WL_POINTER_BUTTON_STATE_PRESSED;
+ bool mouse = false;
};
struct SAxisEvent {
@@ -40,6 +42,7 @@ class IPointer : public IHID {
wl_pointer_axis_relative_direction relativeDirection = WL_POINTER_AXIS_RELATIVE_DIRECTION_IDENTICAL;
double delta = 0.0;
int32_t deltaDiscrete = 0;
+ bool mouse = false;
};
struct SSwipeBeginEvent {
diff --git a/src/devices/Mouse.cpp b/src/devices/Mouse.cpp
index ae89ed92..41652ce4 100644
--- a/src/devices/Mouse.cpp
+++ b/src/devices/Mouse.cpp
@@ -26,6 +26,7 @@ CMouse::CMouse(SP<Aquamarine::IPointer> mouse_) : mouse(mouse_) {
.timeMs = E.timeMs,
.delta = E.delta,
.unaccel = E.unaccel,
+ .mouse = true,
});
});
@@ -46,6 +47,7 @@ CMouse::CMouse(SP<Aquamarine::IPointer> mouse_) : mouse(mouse_) {
.timeMs = E.timeMs,
.button = E.button,
.state = E.pressed ? WL_POINTER_BUTTON_STATE_PRESSED : WL_POINTER_BUTTON_STATE_RELEASED,
+ .mouse = true,
});
});
@@ -59,6 +61,7 @@ CMouse::CMouse(SP<Aquamarine::IPointer> mouse_) : mouse(mouse_) {
.relativeDirection = (wl_pointer_axis_relative_direction)E.direction,
.delta = E.delta,
.deltaDiscrete = E.discrete,
+ .mouse = true,
});
});