address DLP region clicks

This commit is contained in:
Matt McClaskey 2026-05-21 09:34:00 +00:00
parent 0a0d0d3bb1
commit 6880b03c04
No known key found for this signature in database

View file

@ -546,7 +546,23 @@ rfb::Point XserverDesktop::directMouseEventWithPosition(int dx, int dy,
cursorY = maxY;
vncPointerMoveRelative(dx, dy, cursorX, cursorY);
vncPointerButtonAction(buttonMask, false, false);
bool skipclick = false, skiprelease = false;
if (server->DLPRegion.enabled) {
rdr::U16 x1, y1, x2, y2;
server->translateDLPRegion(x1, y1, x2, y2);
rfb::Point cursorPos(cursorX - screenX, cursorY - screenY);
if (cursorPos.x < x1 || cursorPos.x >= x2 ||
cursorPos.y < y1 || cursorPos.y >= y2) {
if (!rfb::Server::DLP_RegionAllowClick)
skipclick = true;
if (!rfb::Server::DLP_RegionAllowRelease)
skiprelease = true;
}
}
vncPointerButtonAction(buttonMask, skipclick, skiprelease);
} else {
vncScroll(scrollX, scrollY);
}