diff options
Diffstat (limited to 'vncviewer/Viewport.h')
-rw-r--r-- | vncviewer/Viewport.h | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/vncviewer/Viewport.h b/vncviewer/Viewport.h index 72df22f4..af1eaf2a 100644 --- a/vncviewer/Viewport.h +++ b/vncviewer/Viewport.h @@ -1,5 +1,5 @@ /* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved. - * Copyright 2011-2019 Pierre Ossman <ossman@cendio.se> for Cendio AB + * Copyright 2011-2021 Pierre Ossman <ossman@cendio.se> for Cendio AB * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,15 +25,18 @@ #include <FL/Fl_Widget.H> #include "EmulateMB.h" +#include "Keyboard.h" class Fl_Menu_Button; class Fl_RGB_Image; class CConn; +class Keyboard; class PlatformPixelBuffer; class Surface; -class Viewport : public Fl_Widget, public EmulateMB { +class Viewport : public Fl_Widget, protected EmulateMB, + protected KeyboardHandler { public: Viewport(int w, int h, const rfb::PixelFormat& serverPF, CConn* cc_); @@ -73,8 +76,6 @@ protected: private: bool hasFocus(); - unsigned int getModifierMask(unsigned int keysym); - static void handleClipboardChange(int source, void *data); void flushPendingClipboard(); @@ -85,16 +86,11 @@ private: void resetKeyboard(); void handleKeyPress(int systemKeyCode, - uint32_t keyCode, uint32_t keySym); - void handleKeyRelease(int systemKeyCode); + uint32_t keyCode, uint32_t keySym) override; + void handleKeyRelease(int systemKeyCode) override; static int handleSystemEvent(void *event, void *data); -#ifdef WIN32 - static void handleAltGrTimeout(void *data); - void resolveAltGrDetection(bool isAltGrSequence); -#endif - void pushLEDState(); void initContextMenu(); @@ -112,13 +108,7 @@ private: rfb::Point lastPointerPos; uint8_t lastButtonMask; -#ifdef WIN32 - bool altGrArmed; - unsigned int altGrCtrlTime; - - bool leftShiftDown; - bool rightShiftDown; -#endif + Keyboard* keyboard; bool firstLEDState; |