aboutsummaryrefslogtreecommitdiffstats
path: root/vncviewer/Viewport.h
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* If the client and server are using identical pixel formats, then perform ↵DRC2011-11-031-6/+10
| | | | | | Tight decoding directly into the viewer's back buffer, rather than going through the slow fillRect/imageRect routines. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4757 3789f03b-4d11-0410-bbf8-ca57d06f2519
* - Changes behaviour of context menu to be reinitializeHenrik Andersson2011-09-141-0/+3
| | | | | | | | | | | | before display with intial states. - Fixes for fullscreen contextmenu item to show the current fullscreen state as it was done in the old viewer. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4670 3789f03b-4d11-0410-bbf8-ca57d06f2519
* The new viewer stores the framebuffer in a native format, instead ofPierre Ossman2011-07-151-3/+10
| | | | | | | | | converting it on each render like the old one. That means we have to change how we deal with colour maps and make sure it is updated before any changes to the framebuffer. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4589 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Implement optimised drawing operations for OS X. Didn't see any reduction inPierre Ossman2011-06-171-1/+6
| | | | | | | | CPU usage unfortunately, but at least we're now using the native pixel format of our server which avoids a conversion on the server side. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4504 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Flushing screen updates after 100 ms turned out to be too aggressive andPierre Ossman2011-06-131-1/+1
| | | | | | | | | just gave an annoying window blinds effect that made things difficult to read. Reduce things to 500 ms, which should be sufficient to tell that the session isn't completely frozen. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4495 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Optimised drawing routines for Win32, based on the old Windows viewer.Pierre Ossman2011-06-131-1/+1
| | | | git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4494 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Optimised drawing routines for X11, roughly based on how the old Unix viewerPierre Ossman2011-06-131-1/+1
| | | | | | | did things. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4493 3789f03b-4d11-0410-bbf8-ca57d06f2519