Toggle game mode

This commit is contained in:
Matthew McClaskey
2022-05-03 17:30:12 +00:00
parent d829572a9c
commit 774a61ace7
9 changed files with 91 additions and 10 deletions

View File

@@ -461,12 +461,17 @@ void XserverDesktop::approveConnection(uint32_t opaqueId, bool accept,
//
// SDesktop callbacks
void XserverDesktop::pointerEvent(const Point& pos, int buttonMask,
void XserverDesktop::pointerEvent(const Point& pos, const Point& abspos, int buttonMask,
const bool skipClick, const bool skipRelease, int scrollX, int scrollY)
{
if (scrollX == 0 && scrollY == 0) {
vncPointerMove(pos.x + vncGetScreenX(screenIndex), pos.y + vncGetScreenY(screenIndex));
if (pos.equals(abspos)) {
vncPointerMove(pos.x + vncGetScreenX(screenIndex), pos.y + vncGetScreenY(screenIndex));
} else {
vncPointerMoveRelative(pos.x, pos.y,
abspos.x + vncGetScreenX(screenIndex),
abspos.y + vncGetScreenY(screenIndex));
}
vncPointerButtonAction(buttonMask, skipClick, skipRelease);
} else {
vncScroll(scrollX, scrollY);