mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-09 08:41:31 +00:00
[client/idd] input: avoid replaying absolute position
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
This commit is contained in:
@@ -569,9 +569,10 @@ NTSTATUS CHIDDevice::SubmitReport(
|
||||
|
||||
NTSTATUS CHIDDevice::ResetReports()
|
||||
{
|
||||
UCHAR mouseMode = 0;
|
||||
uint16_t absoluteX = 0;
|
||||
uint16_t absoluteY = 0;
|
||||
UCHAR mouseMode = 0;
|
||||
uint32_t mouseButtons = 0;
|
||||
uint16_t absoluteX = 0;
|
||||
uint16_t absoluteY = 0;
|
||||
{
|
||||
CSRWSharedLock deviceLock(&s_deviceLock);
|
||||
HIDDeviceContext * context = s_device;
|
||||
@@ -583,6 +584,8 @@ NTSTATUS CHIDDevice::ResetReports()
|
||||
return STATUS_DEVICE_NOT_READY;
|
||||
|
||||
mouseMode = context->mouseMode;
|
||||
mouseButtons = mouseMode == HID_REPORT_ID_MOUSE_ABSOLUTE ?
|
||||
context->absoluteButtons : context->relativeButtons;
|
||||
absoluteX = context->absoluteX;
|
||||
absoluteY = context->absoluteY;
|
||||
context->statistics.resetDiscarded += context->reportCount;
|
||||
@@ -602,36 +605,39 @@ NTSTATUS CHIDDevice::ResetReports()
|
||||
};
|
||||
|
||||
NTSTATUS status = STATUS_SUCCESS;
|
||||
switch (mouseMode)
|
||||
if (mouseButtons)
|
||||
{
|
||||
case HID_REPORT_ID_MOUSE_RELATIVE:
|
||||
switch (mouseMode)
|
||||
{
|
||||
const HIDMouseRelativeReport relative = {
|
||||
HID_REPORT_ID_MOUSE_RELATIVE,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
};
|
||||
status = SubmitReport(&relative, sizeof(relative));
|
||||
break;
|
||||
}
|
||||
case HID_REPORT_ID_MOUSE_RELATIVE:
|
||||
{
|
||||
const HIDMouseRelativeReport relative = {
|
||||
HID_REPORT_ID_MOUSE_RELATIVE,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
};
|
||||
status = SubmitReport(&relative, sizeof(relative));
|
||||
break;
|
||||
}
|
||||
|
||||
case HID_REPORT_ID_MOUSE_ABSOLUTE:
|
||||
{
|
||||
const HIDMouseAbsoluteReport absolute = {
|
||||
HID_REPORT_ID_MOUSE_ABSOLUTE,
|
||||
0,
|
||||
absoluteX,
|
||||
absoluteY,
|
||||
0,
|
||||
};
|
||||
status = SubmitReport(&absolute, sizeof(absolute));
|
||||
break;
|
||||
}
|
||||
case HID_REPORT_ID_MOUSE_ABSOLUTE:
|
||||
{
|
||||
const HIDMouseAbsoluteReport absolute = {
|
||||
HID_REPORT_ID_MOUSE_ABSOLUTE,
|
||||
0,
|
||||
absoluteX,
|
||||
absoluteY,
|
||||
0,
|
||||
};
|
||||
status = SubmitReport(&absolute, sizeof(absolute));
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
const NTSTATUS keyboardStatus =
|
||||
|
||||
Reference in New Issue
Block a user