Manually merged region changes

This commit is contained in:
matt
2021-03-22 10:36:39 +00:00
parent c3e30dcea1
commit 46e03289be
13 changed files with 83 additions and 18 deletions

View File

@@ -155,7 +155,8 @@ static void enqueueEvents(DeviceIntPtr dev, int n)
}
#endif /* XORG < 111 */
void vncPointerButtonAction(int buttonMask)
void vncPointerButtonAction(int buttonMask, const unsigned char skipclick,
const unsigned char skiprelease)
{
int i;
#if XORG < 111
@@ -169,6 +170,14 @@ void vncPointerButtonAction(int buttonMask)
if ((buttonMask ^ oldButtonMask) & (1 << i)) {
int action = (buttonMask & (1<<i)) ?
ButtonPress : ButtonRelease;
if (action == ButtonPress && skipclick) {
buttonMask &= ~(1<<i);
continue;
} else if (action == ButtonRelease && skiprelease) {
buttonMask |= (1<<i);
continue;
}
#if XORG < 110
n = GetPointerEvents(eventq, vncPointerDev,
action, i + 1,

View File

@@ -32,7 +32,8 @@ extern "C" {
void vncInitInputDevice(void);
void vncPointerButtonAction(int buttonMask);
void vncPointerButtonAction(int buttonMask, const unsigned char skipclick,
const unsigned char skiprelease);
void vncPointerMove(int x, int y);
void vncGetPointerPos(int *x, int *y);

View File

@@ -418,11 +418,12 @@ void XserverDesktop::approveConnection(uint32_t opaqueId, bool accept,
// SDesktop callbacks
void XserverDesktop::pointerEvent(const Point& pos, int buttonMask)
void XserverDesktop::pointerEvent(const Point& pos, int buttonMask,
const bool skipClick, const bool skipRelease)
{
vncPointerMove(pos.x + vncGetScreenX(screenIndex),
pos.y + vncGetScreenY(screenIndex));
vncPointerButtonAction(buttonMask);
vncPointerButtonAction(buttonMask, skipClick, skipRelease);
}
void XserverDesktop::clientCutText(const char* str, int len)

View File

@@ -86,7 +86,8 @@ public:
const char* rejectMsg=0);
// rfb::SDesktop callbacks
virtual void pointerEvent(const rfb::Point& pos, int buttonMask);
virtual void pointerEvent(const rfb::Point& pos, int buttonMask,
const bool skipClick, const bool skipRelease);
virtual void keyEvent(rdr::U32 keysym, rdr::U32 keycode, bool down);
virtual void clientCutText(const char* str, int len);
virtual unsigned int setScreenLayout(int fb_width, int fb_height,

View File

@@ -286,6 +286,14 @@ and x2,y2 the lower-left. In addition to absolute pixel values, percentages
are allowed, zero means "default", and a negative number means "border".
.
.TP
.B \-DLP_RegionAllowClick \fIbool\fP
Allow clicks inside the blacked-out region.
.
.TP
.B \-DLP_RegionAllowRelease \fIbool\fP
Allow click releases inside the blacked-out region.
.
.TP
.B \-DLP_ClipSendMax \fIbytes\fP
Limit clipboard bytes to send to clients in one transaction. Default 10,000.
0 disables the limit, use \fBSendCutText\fP to disable clipboard sending entirely.