aboutsummaryrefslogtreecommitdiffstats
path: root/vncviewer/Viewport.h
Commit message (Collapse)AuthorAgeFilesLines
* Add a bypass for keyboard shortcutsPierre Ossman2025-05-271-0/+3
| | | | | | | | | | No matter how carefully you choose your shortcut modifiers, there might still be situations where you need to send those key combinations to the server instead. This commit adds a method for this by letting the <modifiers>+Space combination temporarily bypass the keyboard shortcut logic and send everything to the server (until all keys are released again).
* Use generic keyboard shortcuts for client controlPierre Ossman2025-05-271-4/+2
| | | | | | | | We want to be able to define more keyboard combinations that allows the user to control the client instead of sending the keys to the server. Instead of adding a never ending stream of random keys that just confuses things, we'll define a set of modifiers that are the base for all client control commands.
* Stop saving server pixel formatPierre Ossman2025-03-301-1/+1
| | | | We haven't used that information in a decade.
* Properly store cursor in ServerParams objectPierre Ossman2025-03-301-2/+1
| | | | | | We already had a field in the ServerParams structure, but we never actually stored anything in it. Let's fix that so the cursor behaves like other state we get from the server.
* Move basic data types to core libraryPierre Ossman2025-02-131-6/+7
| | | | | | | Make it clearer what is protocol handling and what is just general plumbing. This is one step of several.
* Merge branch 'largeCursor' of https://github.com/krystof1119/tigervncPierre Ossman2025-01-091-0/+4
|\
| * Add local cursor selection for C++ versionKrystof Pistek2024-08-091-0/+4
| | | | | | | | | | | | This adds the option to select which cursor should be used in the event the server sends an invisible cursor. It also renames the DotWhenNoCursor config option to AlwaysCursor.
* | Merge branch 'keysplit' of https://github.com/CendioOssman/tigervncPierre Ossman2024-12-041-20/+9
|\ \
| * | Move keyboard handling to separate classesPierre Ossman2024-12-041-18/+8
| | | | | | | | | | | | | | | Encapsulate all the platform specific magic around keyboard in to specific classes, in order to keep the core code more readable.
| * | Move keyboard tracking to CConnectionPierre Ossman2024-12-041-9/+3
| | | | | | | | | | | | | | | | | | This is a general thing so move it in to the core library instead, letting vncviewer focus on just translation of system events to VNC ones.
| * | Track keys using system key codePierre Ossman2024-10-161-4/+9
| | | | | | | | | | | | | | | We might not always be able to map to an RFB key code, so let's use the platform specific code to track which keys are pressed.
* | | vncviewer: support for back/forward mouse buttonsAdam Halim2024-10-221-3/+3
|/ / | | | | | | | | | | | | | | This commit implements the pseudo-encoding ExtendedMouseButtons which makes it possible to use the back/forward mouse buttons. This commit contains work originally done by PixelSmith <manny33@frontbuffer.com>.
* / Better type for pointer button maskPierre Ossman2024-08-121-3/+3
|/ | | | | This is a very limited bit field, so use an 8 bit type to clearly show how many bits are available.
* Mark overridden virtual functionsPierre Ossman2024-06-241-4/+4
| | | | | Use the new "override" keyword to properly differentiate between new virtual methods, and existing virtual methods being overridden.
* Completely ignore server clipboard when unfocusedPierre Ossman2023-09-111-1/+0
| | | | | | | | | | | | | | | | | | We can get races with clipboard managers in the server that is very confusing to the user. When the clipboard changes locally, we tell the server to drop the old clipboard (as it is now lost). But we don't send over the new clipboard until we get focus again, in order to not leak more data than necessary. This causes some clibpoard managers to take over ownership in order to avoid an empty clipboard. And this takes precedence over the new client clipboard as it happened later. Effectively reverting the clipboard the user sees. Avoid all of this by simply ignoring the server when we don't have focus. This is likely what users expect anyway as they expect their currently focused application to control the clipboard, not vncviewer in the background.
* Use stdint typesPierre Ossman2023-02-011-4/+4
| | | | | Avoid having our own custom stuff and instead use the modern, standard types, for familiarity.
* Handle macOS keyboard stealingPierre Ossman2022-12-131-0/+2
| | | | | | | | | | The system steals keyboard events for certain system keyboard shortcuts, e.g. Cmd+Tab. Unfortunately this isn't considered a focus loss, so we don't realise we've lost a few keyboard events and can end up in a confused state. Fortunately it is possible to detect when this happens and reset the keyboard state, just like we do when focus is lost.
* Cancel AltGr timeout on mouse events as wellSamuel Mannehed2020-05-291-0/+1
| | | | | | | | | | We have a timer after Ctrl is pressed in order to see if an Alt will come right after. Ctrl + Alt is what windows sends for AltGr. If a key other than Alt was pressed we knew that we could cancel this timer, this commit extends that to mouse events too. Since this detection breaks the true order of events we want to make a decision as fast as possible.
* Add emulated middle mouse buttonAlex Tanskanen2020-01-161-1/+6
| | | | | | | | Not every mouse has three buttons e.g. laptops. Some OS might not have support for middle mouse button emulation. This commit adds emulation for middle mouse button when pressing both left and right mouse button simultaneously.
* Improved clipboard APIPierre Ossman2019-07-011-6/+9
| | | | | Change the internal clipboard API to use a request based model in order to be prepared for more advanced clipboard transfers.
* Add UTF-8 to/from ISO 8859-1 conversion routinesPierre Ossman2019-07-011-2/+2
| | | | | We convert between UTF-8 and ISO 8859-1 (latin 1) in several places so create some common routines for this.
* Clean up internal clipboard handlingPierre Ossman2019-07-011-2/+2
| | | | | | We now filter incoming data, which means we can start assuming the clipboard data is always null terminated. This allows us to clean up a lot of the internal handling.
* Properly sync LED state on connectPierre Ossman2018-06-071-0/+2
| | | | | | We should start by getting the remote end in sync with the actual keyboard state. This would work randomly before depending on if we got the first LED state message before or after we got focus.
* Merge branch 'clipfocus' of https://github.com/CendioOssman/tigervncPierre Ossman2018-04-201-2/+12
|\
| * Avoid clipboard updates when not focusedPierre Ossman2018-03-261-0/+6
| | | | | | | | | | | | | | We don't want to surprise the user with unexpected clipboard changes when vncviewer is in the background, and it is both wasteful and possibly insecure to inform the server of every clipboard update when the user isn't interacting with it.
| * Add focus test helper for ViewportPierre Ossman2018-03-261-0/+1
| |
| * Handle LED state sync entirely in ViewportPierre Ossman2018-03-261-2/+2
| | | | | | | | | | Apply workaround for FLTK's bad focus handling so that we can let Viewport handle LED synchronisation without help from DesktopWindow.
| * Move server cut text handler to ViewportPierre Ossman2018-03-261-0/+3
| | | | | | | | | | That way both incoming and outgoing clipboard are both in the same place, making things clearer.
* | Stop abusing InputHandler class for write classPierre Ossman2018-03-281-0/+2
|/ | | | | | The handler is for incoming data and we should not be abusing that class for the writer class. Do proper write prototypes for the relevant functions.
* Better detection of AltGr on WindowsPierre Ossman2018-03-081-0/+9
| | | | | | Try to properly detect the fake CtrlL+AltR sequence Windows sends when pressing AltGr. This allows us to send more accurate key events over to the server.
* Add support for raw keyboard in vncviewerPierre Ossman2017-09-111-1/+1
| | | | | Make sure it can map between the key codes of the local system in to the key codes used by the protocol.
* Sync LED state when gaining focusPierre Ossman2017-08-241-0/+2
| | | | | The state might have changed when we didn't have focus. Get everything back in sync once we're back in control.
* Add client support for LED state syncPierre Ossman2017-08-241-0/+5
|
* Change cursor API to use RGBA dataPierre Ossman2017-02-221-1/+1
| | | | | This will allow us to use better formats that preserve the entire alpha channel.
* Render on a temporary surface when neededPierre Ossman2017-02-101-0/+3
| | | | | | Some platforms draw directly to the screen, which means that updates will flicker if we draw multiple layers. Prevent this by first composing the update on a hidden surface.
* Abstract platform rendering to "surfaces"Pierre Ossman2017-02-101-2/+0
| | | | This will allow us to render more things than just the framebuffer.
* Remove unused declarations from Viewport.hPierre Ossman2017-01-031-4/+0
|
* Delegate decoder object management to a separate classPierre Ossman2015-11-271-3/+0
| | | | | | | | | Done in preparation for multi-core decoding. Keeps the complexity out of the other classes. This also moves ownership of the framebuffer in to CConnection. It's the CConnection object that is aware of the threads and how to synchronise with them. Therefore the ownership of the framebuffer must also be there to make sure it isn't deleted whilst threads are working.
* Raise FLTK requirement to 1.3.3Pierre Ossman2015-01-271-3/+0
| | | | This means that we can remove a lot of conditionals and fallback code.
* Update FLTK patches based on feeback from upstreamPierre Ossman2014-09-111-1/+1
|
* Add xhandler hookPierre Ossman2014-08-221-0/+2
| | | | | Boiler plate code to intercept system events from FLTK so that we can generate proper keyboard messages.
* Remove simple keyboard modelPierre Ossman2014-08-221-2/+6
| | | | | Remove the FLTK simple keyboard system and reorganise things in preparation for a more direct approach.
* Use PixelBuffer objects as the interface for encoders and decodersPierre Ossman2014-07-141-19/+5
| | | | | | | This avoid a lot of unnecessary middle men. This also pushes the responsibility for pixel format conversion into the encoders and decoders. The new bufferFromBuffer() is used for direct conversion, rather than PixelTransformer/TransImageGetter.
* Provide a better R/W base PixelBuffer classPierre Ossman2014-07-071-2/+3
| | | | | Clearly separates the read API from the write API and also from actual implementation.
* Create a proper interface base class for the viewport's framebufferPierre Ossman2014-07-071-0/+2
| | | | | This allows us to gracefully fall back to the FLTK code in case the platform specific code cannot be used.
* Remove full support for colour mapsPierre Ossman2014-07-071-9/+0
| | | | | | | | | Gets rid of a loooot of code and complexity. Colour map clients are still supported through an automatically generated map, but we lose the ability to develop a client or server that uses colour maps internally.
* Remove some premature optimisationPierre Ossman2014-07-071-54/+12
| | | | Reduces header dependencies.
* Be more consistent in referring to pixel byte streams as buffersPierre Ossman2014-07-071-2/+2
|
* Remove unused method prototypePierre Ossman2014-07-071-1/+0
|
* Clean up header dependencies in the vncviewer directoryPierre Ossman2014-07-071-5/+3
|