diff options
author | Pierre Ossman <ossman@cendio.se> | 2023-02-25 15:16:18 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2024-08-12 16:46:15 +0200 |
commit | 9fae0999d3efa7a04698d639f7bd842ede7a83d2 (patch) | |
tree | 6dda527a4b03cd15f7292e95fb13883e434f3367 /vncviewer/EmulateMB.h | |
parent | 5c3371d8e7e58fd873699c5309e5a74ed0e9fac4 (diff) | |
download | tigervnc-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 'vncviewer/EmulateMB.h')
-rw-r--r-- | vncviewer/EmulateMB.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vncviewer/EmulateMB.h b/vncviewer/EmulateMB.h index caf3c32a..1afa4881 100644 --- a/vncviewer/EmulateMB.h +++ b/vncviewer/EmulateMB.h @@ -26,22 +26,22 @@ class EmulateMB : public rfb::Timer::Callback { public: EmulateMB(); - void filterPointerEvent(const rfb::Point& pos, int buttonMask); + void filterPointerEvent(const rfb::Point& pos, uint8_t buttonMask); protected: - virtual void sendPointerEvent(const rfb::Point& pos, int buttonMask)=0; + virtual void sendPointerEvent(const rfb::Point& pos, uint8_t buttonMask)=0; void handleTimeout(rfb::Timer *t) override; private: - void sendAction(const rfb::Point& pos, int buttonMask, int action); + void sendAction(const rfb::Point& pos, uint8_t buttonMask, int action); - int createButtonMask(int buttonMask); + int createButtonMask(uint8_t buttonMask); private: int state; - int emulatedButtonMask; - int lastButtonMask; + uint8_t emulatedButtonMask; + uint8_t lastButtonMask; rfb::Point lastPos, origPos; rfb::Timer timer; }; |