aboutsummaryrefslogtreecommitdiffstats
path: root/vncviewer/cocoa.mm
Commit message (Collapse)AuthorAgeFilesLines
* Use nullptr in all C++ codePierre Ossman2024-06-241-3/+3
| | | | | It's more readable than 0, and a bit safer than NULL, so let's try to follow modern norms.
* Move window to front on full screenPierre Ossman2022-12-151-0/+5
| | | | | This should be happening implicitly, but isn't always for some reason on macOS 13.
* Handle macOS keyboard stealingPierre Ossman2022-12-131-0/+21
| | | | | | | | | | 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.
* Fix "grave" and "ISO" keys on macOSPierre Ossman2022-08-231-1/+12
| | | | | We lacked an entry for one of these, and the magical swap that macOS does for unknown reasons.
* Workaround options window appearing behind viewerSamuel Mannehed2021-10-061-0/+14
| | | | | | | | | FLTK's fullscreen_x() function will always put the window on a high level (NSStatusWindowLevel = 25), even if the window doesn't have focus. This causes the OptionsDialog to end up behind the DesktopWindow when the fullscreen function is called. Until we can rest assured that most people building TigerVNC will use a fixed version of FLTK, we will need this workaround.
* Release displays not enclosed by the windowHugo Lundin2021-07-161-19/+23
| | | | | | | | | | | | | | cocoa_capture_displays it captures all displays enclosed by the window_rect. If a set of displays were captured, but the configuration of what monitors to use changed, a second call would only add to the set of captured displays. Therefore, if the user enabled FullScreenAllMonitors (all displays captured) and then disabled it (only one display captured) they would get into a state were monitors not used for the VNC session still were captured (which on macOS for example, results in displays being unusable for other things). This has now been fixed, resulting in monitors outside the window_rect not being unnecessarily captured.
* Capture all displays inside the viewport (macOS)Hugo Lundin2021-07-161-16/+21
| | | | | | | | | | | | It was only possible to capture either the current, or all displays previously. This could become an issue if you want to show a vnc session over only a selected set of displays, because then we only want to capture those displays. The solution in the commit was chosen because it handles all cases - by looking at what monitors are enclosed by the viewport the implementation is independent on any configuration, but instead captures the monitors actually being used.
* Map macOS Eisu key to XK_Eisu_togglePierre Ossman2020-12-091-1/+1
| | | | | | It's a better match for what the key symbolises, even though it is not as common on Unix systems. But we want to avoid getting in to tailoring things for any one specific input method implementation.
* OS X Japanese Keyboard Supportgsittyz2020-10-251-0/+3
| | | | Added OS X JIS Keyboard keys (kVK_JIS_Eisu, kvK_JIS_Kana). The Kana and Eisu keys are used to alter IME behavior, but currently the Kana key produces an unwanted space character and the Eisu key does not work.
* Do maximize more properly on macOSPierre Ossman2020-03-261-0/+7
|
* Don't resize viewer window when maximizedPierre Ossman2020-03-261-0/+7
| | | | | 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.
* Always get raw keyboard layout on macOSPierre Ossman2019-04-041-1/+1
| | | | | | | | | | Some input sources are still using input methods even though they claim to be "ASCII" input. This causes our input handling to fail since we need to query the layout to handle dead keys. Fortunately there is another API to get the raw, underlying input source that the input method uses. So let's use that and be sure that we're always getting something we can use.
* Sync LED state when gaining focusPierre Ossman2017-08-241-0/+27
| | | | | 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/+50
|
* Compatibility with macOS 10.12 SDKPierre Ossman2017-05-241-1/+4
| | | | | They finally added kVK_RightCommand, so our workaround needs to be conditional.
* Use correct color space for current monitorPierre Ossman2017-04-281-0/+22
| | | | | | We won't always be on the primary monitor, so check which color space we're actually using right now. For offscreen stuff we assume a standard sRGB color space.
* Remove support for old macOSPierre Ossman2017-02-091-176/+81
| | | | Raising the requirement to 10.5 allows us to clean up the code a bit.
* Merge branch 'upreqs' of https://github.com/CendioOssman/tigervncPierre Ossman2015-03-121-6/+0
|\ | | | | | | | | | | Conflicts: contrib/packages/rpm/el5/SPECS/tigervnc.spec vncviewer/Viewport.cxx
| * Raise FLTK requirement to 1.3.3Pierre Ossman2015-01-271-6/+0
| | | | | | | | This means that we can remove a lot of conditionals and fallback code.
* | Fix bad signed/unsigned comparisonsPierre Ossman2015-03-031-2/+2
| | | | | | | | | | Either by casting, or switching to a more appropriate type for the variable.
* | The legacy OS X keyboard API is only 32-bitPierre Ossman2015-02-251-1/+1
|/
* Add OS X keyboard handlerPierre Ossman2014-08-221-0/+382
|
* Have to properly include config.h for the HAVE_... stuff to work.Pierre Ossman2012-09-111-0/+4
| | | | git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4999 3789f03b-4d11-0410-bbf8-ca57d06f2519
* The OS X keyboard grabbing code needs to be multi-head aware to functionPierre Ossman2012-08-271-4/+25
| | | | | | | properly. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4977 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Implement a more robust method to handle the keyboard grab/focus voodoo asPierre Ossman2011-06-141-5/+13
| | | | | | | it didn't catch some cases on OS X. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4496 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Implement support for grabbing the keyboard when in full screen mode.Pierre Ossman2011-05-261-0/+69
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4449 3789f03b-4d11-0410-bbf8-ca57d06f2519