aboutsummaryrefslogtreecommitdiffstats
path: root/vncviewer/DesktopWindow.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Implement X Input pointer handling for UnixAaron Sowry2020-05-291-15/+7
| | | | | | | | Switch from using Core events to using X Input events for pointer devices in order to differentiate between mouse events and touch events. Because FLTK doesn't understand X Input 2, we intercept these events and translate them to core events where possible.
* Ignore bogus FL_MOVE events from FLTKSamuel Mannehed2020-05-261-0/+6
|
* Do maximize more properly on macOSPierre Ossman2020-03-261-7/+1
|
* Don't resize viewer window when maximizedPierre Ossman2020-03-261-1/+38
| | | | | Most window managers won't like this, and it tends to provoke bugs in FLTK, so let's avoid it. It's probably not what the user wants anyway.
* Don't show the context menu hint when no hotkeySamuel Mannehed2019-10-251-2/+5
|
* Merge branch 'exclipboard' of https://github.com/CendioOssman/tigervncPierre Ossman2019-07-011-6/+16
|\
| * Improved clipboard APIPierre Ossman2019-07-011-6/+16
| | | | | | | | | | Change the internal clipboard API to use a request based model in order to be prepared for more advanced clipboard transfers.
| * 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.
* | Request keyboard grab ability under XwaylandPierre Ossman2019-06-181-0/+22
|/ | | | | We're usually white listed, but let's be a good citizen and formally request the keyboard grab ability from the compositor.
* Merge branch 'connparams' of https://github.com/CendioOssman/tigervncPierre Ossman2018-12-101-14/+14
|\
| * Split out ServerParams from ConnParamsPierre Ossman2018-11-011-13/+13
| | | | | | | | | | | | We need to track different things in the server and client, so separate things to two independent structures to keep things more clear.
| * Encapsulate screen layout storage in ConnParamsPierre Ossman2018-11-011-12/+12
| | | | | | | | | | | | | | Avoid direct access to the screen dimensions and layout so that we can make sure it stays sane. This also makes sure the layout is properly updated when we only get the screen dimensions from the server.
* | Fix memory leaksJan Grulich2018-11-201-2/+2
|/
* Fix multi-head placement of overlay (again)Pierre Ossman2018-09-111-11/+4
| | | | | We should be looking at the physical monitor layout, not the current RFB layout. The latter might not be in sync with the local monitors.
* Remove dead overlay codePierre Ossman2018-09-111-5/+0
| | | | Remnants from an earlier version of the code.
* Center overlay on primary screenPierre Ossman2018-08-161-2/+21
| | | | | Makes sure it is readable in a multi screen configuration, as otherwise it might end up crossing multiple screens.
* Reduce size of context menu hintPierre Ossman2018-07-191-5/+8
| | | | | It can get a bit intrusive for experienced users, so try to reduce the impact of it.
* Ignore fake focus events from XGrabKeyboard()Pierre Ossman2018-06-121-0/+44
| | | | | | | | Grabbing (and ungrabbing) the keyboard generates fake focus events with modern versions of Xorg. This causes an infinite loop since we update the grab status on focus events. Work around this by ignoring these fake events.
* Update comment about keyboard grab on focus changesPierre Ossman2018-06-121-9/+4
| | | | It is no longer a workaround but rather intended behaviour.
* Update fullscreen window if changing fullScreenAllMonitors optionPeter Åstrand (astrand)2018-05-021-2/+5
|
* Handle LED state sync entirely in ViewportPierre Ossman2018-03-261-4/+0
| | | | | 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/+6
| | | | | That way both incoming and outgoing clipboard are both in the same place, making things clearer.
* Replace "frames" with "updates" in statsPierre Ossman2018-03-261-13/+13
| | | | | | The VNC servers aren't great at getting full frames with each update, so avoid calling it "frames per second" in the statistics as that can be misleading.
* Fix incorrect numbers in performance debug graphPierre Ossman2018-02-261-3/+3
| | | | | | | | | Copy paste errors/brain fart: - Pixels do not need a factor 8 for any conversion - Multiplying bytes by 8 gives bits, so lower case 'b', and bits use SI prefixes, not IEC
* Use current server time for XUngrabPointerPeter Åstrand (astrand)2018-01-151-1/+1
| | | | | | Similar to 841e9f32d5952d6f16f67294c2da8bf395066a9b but for the pointer. Fixes a problem where the desktop environment is unresponsive (to the mouse) after fullscreen exit; Fixes #579.
* Use current server time for XUngrabKeyboardPierre Ossman2017-10-021-1/+1
| | | | | We might be calling this outside a normal FLTK event, so we cannot trust fl_event_time to have a sane value.
* Remove accidental debug outputPierre Ossman2017-09-221-1/+0
|
* Release pointer grab when cursor leaves windowPierre Ossman2017-09-181-13/+72
| | | | | | We don't need the grab any more if the pointer cannot click on our window. This makes it possible to shift focus to another application when we aren't covering all monitors.
* Sync LED state when gaining focusPierre Ossman2017-08-241-12/+20
| | | | | 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/+6
|
*-. Merge branches 'fix-fullscreen-scroll' and 'fix-scrollbar-visibility' of ↵Pierre Ossman2017-05-311-13/+28
|\ \ | | | | | | | | | https://github.com/LukeShu/tigervnc
| | * vncviewer: Fix scrollbar visibilityLuke Shumaker2017-05-241-7/+27
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Have a window that is sized to the remote screen. Now shrink the window vertically, making it shorter than the remote screen in one axis. The vertical scrollbar appears. However, the horizontal scrollbar does not appear, despite the rightmost ~24 pixels (Fl::scrollbar_size()) being hidden by the vertical scroll bar. Fix that. For clarity, move the fullscreen checks into a separate `if` statement, rather than keeping the size and fullscreen checks together. I think the comment does a decent job of explaining and justifying the check's logic, but if you require further convincing, perhaps this alternate explanation will help: The check for the X-axis is if ((w() - (h() < viewport->h() ? Fl::scrollbar_size() : 0) < viewport->w()) To be a bit more verbose and repetitive, we can split that ternary in to two separate checks, and add some comments: if ( (w() - < viewport->w()) // X needs a scrollbar || ( (w() - Fl::scrollbar_size() < viewport->w()) && (h() < viewport->h()) ) //( X doesn't need a scrollbar unless Y does ) && ( Y does need one ) ) ) Within the "Y does need one" check, we don't need to worry about the case where `h() - Fl::scrollbar_size() < viewport-h()` is true, because if both axes are saying "I don't need a scrollbar unless you do", then neither needs one.
| * vncviewer: Fix fullscreen scrollingLuke Shumaker2017-05-241-6/+1
|/
* Only draw overlays when neededPierre Ossman2017-04-281-8/+12
| | | | Some backends don't like empty draw operations, so have an early check.
* Fix for "Invalid use of member 'stats' in static member function"Brian P. Hinz2017-03-101-2/+2
|
* Display performance statistics in viewerPierre Ossman2017-02-241-1/+154
| | | | | | Adds an optional graph to the viewer to display current frame rate, pixel rate and network bandwidth. Makes it easier to debug and test performance related issues.
* Get correct text width for overlayPierre Ossman2017-02-241-0/+1
| | | | Incoming width specifies wrapping width, and we do not want any wrapping.
* Change cursor API to use RGBA dataPierre Ossman2017-02-221-2/+2
| | | | | This will allow us to use better formats that preserve the entire alpha channel.
* Fade overlay in and outPierre Ossman2017-02-101-10/+26
|
* Add overlay tip to help find the context menuPierre Ossman2017-02-101-10/+161
|
* Render on a temporary surface when neededPierre Ossman2017-02-101-18/+36
| | | | | | 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.
* Handle scrolling manuallyPierre Ossman2017-02-101-53/+140
| | | | | Stop fighting with the FLTK scroll widget and handle layout ourselves. This opens up the possibility of doing more complex drawing as well.
* Delegate decoder object management to a separate classPierre Ossman2015-11-271-6/+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.
* Remove parameter "hasBeenSet" logicPierre Ossman2015-04-271-3/+3
| | | | | It doesn't really make sense anymore given that settings might come from the GUI or configuration and not only the command line.
* Remove no longer functional workaroundPierre Ossman2015-02-161-9/+0
| | | | | | This workaround is no longer effective with the new system handler method of handling keyboard events. The bug has also been fixed in upstream FLTK, further making it pointless.
* Raise FLTK requirement to 1.3.3Pierre Ossman2015-01-271-53/+2
| | | | This means that we can remove a lot of conditionals and fallback code.
* More debug logging for screen layout changesPierre Ossman2015-01-261-2/+5
|
* Make sure we do an initial resizePierre Ossman2014-11-111-4/+12
| | | | | | The local window manager might give us a window of a different size than the one we request. Make sure that the remote resize setting gets respected even in this case.
* Make sure user visible strings are translatedPierre Ossman2014-09-221-3/+3
|
* Use PixelBuffer objects as the interface for encoders and decodersPierre Ossman2014-07-141-24/+3
| | | | | | | 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.