mirror of
https://github.com/swaywm/sway.git
synced 2024-12-30 17:06:40 +01:00
input/cursor: don't apply pointer constraint to emulated tablet input
Closes #5268.
This commit is contained in:
parent
a8a6ed667d
commit
2262ae60f4
1 changed files with 7 additions and 4 deletions
|
@ -292,16 +292,19 @@ void cursor_unhide(struct sway_cursor *cursor) {
|
||||||
static void pointer_motion(struct sway_cursor *cursor, uint32_t time_msec,
|
static void pointer_motion(struct sway_cursor *cursor, uint32_t time_msec,
|
||||||
struct wlr_input_device *device, double dx, double dy,
|
struct wlr_input_device *device, double dx, double dy,
|
||||||
double dx_unaccel, double dy_unaccel) {
|
double dx_unaccel, double dy_unaccel) {
|
||||||
|
if (device->type == WLR_INPUT_DEVICE_POINTER) {
|
||||||
cursor_handle_activity(cursor, IDLE_SOURCE_POINTER);
|
cursor_handle_activity(cursor, IDLE_SOURCE_POINTER);
|
||||||
|
}
|
||||||
|
|
||||||
wlr_relative_pointer_manager_v1_send_relative_motion(
|
wlr_relative_pointer_manager_v1_send_relative_motion(
|
||||||
server.relative_pointer_manager,
|
server.relative_pointer_manager,
|
||||||
cursor->seat->wlr_seat, (uint64_t)time_msec * 1000,
|
cursor->seat->wlr_seat, (uint64_t)time_msec * 1000,
|
||||||
dx, dy, dx_unaccel, dy_unaccel);
|
dx, dy, dx_unaccel, dy_unaccel);
|
||||||
|
|
||||||
|
// Only apply pointer constraints to real pointer input.
|
||||||
|
if (cursor->active_constraint && device->type == WLR_INPUT_DEVICE_POINTER) {
|
||||||
struct wlr_surface *surface = NULL;
|
struct wlr_surface *surface = NULL;
|
||||||
double sx, sy;
|
double sx, sy;
|
||||||
if (cursor->active_constraint) {
|
|
||||||
node_at_coords(cursor->seat,
|
node_at_coords(cursor->seat,
|
||||||
cursor->cursor->x, cursor->cursor->y, &surface, &sx, &sy);
|
cursor->cursor->x, cursor->cursor->y, &surface, &sx, &sy);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue