aboutsummaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2023-02-25 15:16:18 +0100
committerPierre Ossman <ossman@cendio.se>2024-08-12 16:46:15 +0200
commit9fae0999d3efa7a04698d639f7bd842ede7a83d2 (patch)
tree6dda527a4b03cd15f7292e95fb13883e434f3367 /win
parent5c3371d8e7e58fd873699c5309e5a74ed0e9fac4 (diff)
downloadtigervnc-9fae0999d3efa7a04698d639f7bd842ede7a83d2.tar.gz
tigervnc-9fae0999d3efa7a04698d639f7bd842ede7a83d2.zip
Better type for pointer button mask
This is a very limited bit field, so use an 8 bit type to clearly show how many bits are available.
Diffstat (limited to 'win')
-rw-r--r--win/rfb_win32/SDisplay.cxx2
-rw-r--r--win/rfb_win32/SDisplay.h2
-rw-r--r--win/rfb_win32/SInput.cxx2
-rw-r--r--win/rfb_win32/SInput.h2
4 files changed, 4 insertions, 4 deletions
diff --git a/win/rfb_win32/SDisplay.cxx b/win/rfb_win32/SDisplay.cxx
index b1abf849..0ec5e231 100644
--- a/win/rfb_win32/SDisplay.cxx
+++ b/win/rfb_win32/SDisplay.cxx
@@ -312,7 +312,7 @@ void SDisplay::handleClipboardData(const char* data) {
}
-void SDisplay::pointerEvent(const Point& pos, int buttonmask) {
+void SDisplay::pointerEvent(const Point& pos, uint8_t buttonmask) {
if (pb->getRect().contains(pos)) {
Point screenPos = pos.translate(screenRect.tl);
// - Check that the SDesktop doesn't need restarting
diff --git a/win/rfb_win32/SDisplay.h b/win/rfb_win32/SDisplay.h
index 76780d9e..d4cf23e4 100644
--- a/win/rfb_win32/SDisplay.h
+++ b/win/rfb_win32/SDisplay.h
@@ -80,7 +80,7 @@ namespace rfb {
void handleClipboardRequest() override;
void handleClipboardAnnounce(bool available) override;
void handleClipboardData(const char* data) override;
- void pointerEvent(const Point& pos, int buttonmask) override;
+ void pointerEvent(const Point& pos, uint8_t buttonmask) override;
void keyEvent(uint32_t keysym, uint32_t keycode, bool down) override;
// -=- Clipboard events
diff --git a/win/rfb_win32/SInput.cxx b/win/rfb_win32/SInput.cxx
index 94df6e98..65d4a703 100644
--- a/win/rfb_win32/SInput.cxx
+++ b/win/rfb_win32/SInput.cxx
@@ -65,7 +65,7 @@ win32::SPointer::SPointer()
}
void
-win32::SPointer::pointerEvent(const Point& pos, int buttonmask)
+win32::SPointer::pointerEvent(const Point& pos, uint8_t buttonmask)
{
// - We are specifying absolute coordinates
DWORD flags = MOUSEEVENTF_ABSOLUTE;
diff --git a/win/rfb_win32/SInput.h b/win/rfb_win32/SInput.h
index 9013a37e..29e1df41 100644
--- a/win/rfb_win32/SInput.h
+++ b/win/rfb_win32/SInput.h
@@ -44,7 +44,7 @@ namespace rfb {
// - Create a pointer event at a the given coordinates, with the
// specified button state. The event must be specified using
// Screen coordinates.
- void pointerEvent(const Point& pos, int buttonmask);
+ void pointerEvent(const Point& pos, uint8_t buttonmask);
protected:
Point last_position;
uint8_t last_buttonmask;