aboutsummaryrefslogtreecommitdiffstats
path: root/vncviewer
Commit message (Collapse)AuthorAgeFilesLines
* Clear clipboard state when its not plain textSamuel Mannehed2024-10-221-0/+3
| | | | | | | | | | | | Commit 8a80c906b9f7c08b1c664569a97d327d62c6d8ae added a check to prevent announcing clipboard when it's not plain text data. When this check triggers and we want to ignore the non-plain text clipboard, we should reset the state by no longer indicating pending clipboard, and by asking the server to clear its clipboard. This ensures we don't end up in a state where the server thinks the viewer has useful clipboard data, but it doesn't. (cherry picked from commit 6f6d9406035d59b6a9f59ff0f38206c0c98a0266)
* Only announce clipboard for plain text dataSamuel Mannehed2024-10-221-0/+5
| | | | | | | | | | | | | | | FLTK has support for both image and plain text clipboard data, we don't. This means we only send plain text clipboard from the viewer to the server. Some applications can get confused when we announce that clipboard is available and later don't send anything. An example of such an application is QGIS, in the remote session it froze when an image was copied on the client side. This fix means we only call announceClipboard() when the clipboard contains plain text. That means TigerVNC is now more robust and doesn't trigger freezes in buggy applications. (cherry picked from commit 8a80c906b9f7c08b1c664569a97d327d62c6d8ae)
* Explicitly clean up grabs on disconnectPierre Ossman2024-10-221-0/+5
| | | | | | | They are not automatically cleaned up with the window on Windows, and we might want to reconnect so we cannot rely on the process cleanup either. (cherry picked from commit 43ce674dfbd2576fe5b382ad9f87e5beebc72812)
* Handle server history with '/' in entriesPierre Ossman2024-10-221-1/+3
| | | | | | This happens if you've connected to a server using a Unix socket. (cherry picked from commit 4236d0c644a7454ab7a955e837143a8fd0777c09)
* vncviewer: add missing include for struct timevalThomas Klausner2024-10-221-0/+2
| | | | (cherry picked from commit 169ffe18c141a4ca1fc2e790e927a1aa49cce30e)
* Only read first password from filePierre Ossman2024-10-221-1/+1
| | | | | | | | | | Read just the first password and ignore anything else in the password file. This allows you to reuse a password file from the server that also includes a view-only password. This fixes a regression introduced in b99daad. (cherry picked from commit 49a087e8f8ecafe950a86a71ae6657d6cac8ea77)
* Handle failure getting VNC directoriesPierre Ossman2024-10-221-6/+25
| | | | | | | Although rare, there are cases where we might fail to determine our base directories. Make sure the code can handle it. (cherry picked from commit edee4db8d1fd85495f189293041311bfff56d23c)
* Move base directory creation to helper functionPierre Ossman2024-10-221-25/+31
| | | | | | This is non-trivial now, so let's modularize this a bit. (cherry picked from commit 0c61c069bab38d14b93ad9d71b6509427a5611a8)
* Apple only: exit FL_Window fullscreen if active in order to minimize.Rudimar Ronsoni Jr2024-10-221-0/+4
| | | | (cherry picked from commit a1bd5cf795d36dd4ce17e980b5cb0a7f200756b5)
* Merge branch 'present' of github.com:CendioOssman/tigervncPierre Ossman2024-06-195-10/+6
|\
| * Explicitly request timer repetitionPierre Ossman2024-06-194-9/+5
| | | | | | | | | | | | One-shot timers are more common, so let's change the API a bit to make that use case simpler. This API also makes it more clear what is happening.
| * Stop treating "0" as "no timeouts"Pierre Ossman2024-06-191-1/+1
| | | | | | | | | | It is much more sane to treat "0" as "a timer is ready NOW", so let's change to using -1 as the invalid timeout value.
* | Create common recursive mkdir()Pierre Ossman2024-05-301-34/+15
| | | | | | | | | | | | | | Avoid duplicating this complexity in too many places. At the same time make the interface more identical to regular mkdir(), for familiarity.
* | Merge pull request #1737 from 62832/fix-1195Samuel Mannehed (ThinLinc team)2024-05-075-32/+81
|\ \ | | | | | | Allow for alternative user config locations, deprecate `~/.vnc` in favour of XDG Base Directory Specification paths
| * | Implement XDG Base Directory paths, deprecate ~/.vnc902024-04-263-10/+35
| | |
| * | Begin work on XDGBDS compliance and overrideable configs902024-03-153-26/+50
| |/
* | Use XQueryPointer() instead to detect zaphodPierre Ossman2024-04-101-4/+8
| | | | | | | | | | | | FLTK can send events with fl_xevent pointing to random memory, which means that we cannot trust that structure. XQueryPointer() can give us what we need, at the cost of an extra round trip.
* | Correctly set socket write notificationPierre Ossman2024-04-091-2/+0
|/ | | | | That extra add_fd() only set the read notification, overwriting any write notification set up in the lines just above.
* Set all HAVE_ macros on the top levelPierre Ossman2024-01-241-1/+0
| | | | This keep everything consistent.
* Update copyright year to 2024Samuel Mannehed2024-01-092-2/+2
|
* Prevent incorrect cmake usagePierre Ossman2023-12-281-0/+4
| | | | | | | | | | It's a reoccurring issue that users try to build individual components by pointing cmake at a specific subdirectory, e.g. 'cmake vncviewer'. CMake, unfortunately, has insufficient protection against this so we'll need to add a manual check. This commit only adds it to the most likely places for misuse so we don't have to pollute every CMakeLists.txt.
* Automatically generate keyucsmap.hPierre Ossman2023-12-132-54/+109
| | | | | All the information we need is now available in keysymdef.h, so let's get everything updated and in sync.
* Move Keysym/Unicode mapping table to separate filePierre Ossman2023-12-132-789/+800
| | | | Make it easier to see what's code and what's just a lot of data.
* Move dead/combining keys to separate tablePierre Ossman2023-12-131-39/+82
| | | | | This is a manually set up table specific for TigerVNC. For clarity, separate it out from the general keysym/Unicode table.
* Add own keysym to name functionPierre Ossman2023-11-161-10/+3
| | | | | | | | | This is mainly a copy of XKeysymToString() from libX11. We've also added a wrapper that still gives a string, even if there is no name for the requested keysym. This grows the binaries a bit, but not with any extreme amount so is hopefully worth it to get better debug logging.
* fix spelling errorut0045272023-11-061-1/+1
|
* Completely ignore server clipboard when unfocusedPierre Ossman2023-09-112-20/+4
| | | | | | | | | | | | | | | | | | 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.
* More graceful handling of disabled listenersPierre Ossman2023-09-081-0/+2
| | | | | | Don't assume a lack of TCP listeners means the server will be unreachable. There might be other methods of access, so let the higher levels do that sanity check instead.
* Change accelerator for "Disconnect" entryPierre Ossman2023-08-211-1/+1
| | | | | | | Using "c" is in conflict the the "Ctrl" entry, so we need to pick something else here. This was a regression introduced in 44b085a.
* Move custom FLTK box types to valid rangePierre Ossman2023-08-172-1/+6
| | | | | | | | FLTK only allows 256 different box types, but it doesn't actually check this when registering new ones. Move our custom types to a valid range, and add an assert for good measure to make sure we don't overflow FLTK's internal structures.
* Update copyright year to 2023Samuel Mannehed2023-07-202-2/+2
|
* Use modern UI colorsPierre Ossman2023-07-141-6/+34
| | | | | Follow the colors that modern desktops use when it comes to background, text and selections.
* Workaround for broken fl_arc()/fl_pie()Pierre Ossman2023-07-141-0/+25
| | | | | | | There is something broken with these FLTK draw routines on Windows. They leave gaps at the start and end of the arc/pie rather than filling the whole specified span. So we need to nudge the numbers a bit to work around this.
* Apply custom theme to FLTKPierre Ossman2023-07-142-7/+204
| | | | | | | | | | | Inspired by modern Windows appearance, and to some extent macOS. They have flat boxes and use white, or very light, colors for interactive elements. Unfortunately we can't directly control the colors of widgets, so instead we just lighten everything that uses this box type. GNOME uses a different design, both their older and newer style. But UI look is less consistent on Linux, so hopefully our new look is decent enough there as well.
* Fix correct background in Fl_Input_ChoicePierre Ossman2023-07-141-0/+2
| | | | | Work around a bug in Fl_Input_Choice where it forgets to set the proper "input background" on some parts.
* Respect selection color in monitor widgetPierre Ossman2023-07-132-4/+2
| | | | We should have a consistent color set over all widgets.
* Don't tag up gettext's *wprintf() functionsPierre Ossman2023-07-061-3/+3
| | | | | | | | | | gcc doesn't support -Wformat for the wide format versions of printf() and friends yet: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38308 Do what glibc does and have some commented out tags to show future intent.
* Unbreak -Wformat warnings when gettext is usedPierre Ossman2023-07-051-1/+23
| | | | | | | | | | gettext replaces all *printf() functions on platforms that don't fully conform to the POSIX behaviour. Unfortunately, gettext fails to tag these replacement functions properly so that -Wformat can still do its thing. Resolve this by adding a redudant declaration of the relevant functions, with the attribute tagging in place.
* Use smaller, stable, int for history indexPierre Ossman2023-07-051-2/+2
| | | | | | The size of size_t depends on the architecture, so we need to have different conversion to and from strings. But we don't really need that range, so avoid the issue by using a standard integer size.
* Fix WM_CLASS in desktop filePierre Ossman2023-07-031-1/+1
| | | | | The WM_CLASS we set on all windows is just "vncviewer", so that it matches the name of the .desktop file, which is what GNOME expects.
* Merge branch 'types2' of https://github.com/CendioOssman/tigervncPierre Ossman2023-06-303-2/+7
|\
| * Clean up string encoding handlingPierre Ossman2023-06-301-0/+5
| | | | | | | | | | | | We should handle this in the low-level protocol code as much as possible to avoid mistakes. This way the rest of the code can assume that strings are always UTF-8 with \n line endings.
| * Consistently use uint8_t for data buffersPierre Ossman2023-03-182-2/+2
| | | | | | | | | | These will always be byte streams at heart, so let's try to keep them with a proper type. Should make it clearer how they will be used.
* | Remove unneeded "using namespace"Pierre Ossman2023-06-144-5/+0
| | | | | | | | The need for these must have got lost somewhere in the type cleanup.
* | Avoid wildcards in cmake rulesPierre Ossman2023-04-171-4/+10
| | | | | | | | They are not fully supported and break with some backends, like Ninja.
* | Prefer target_include_directories()Pierre Ossman2023-03-311-6/+4
| | | | | | | | | | It is more specific, and it properly sets up propagation when include directories also need to be used further down a dependency chain.
* | Detect leaving window on zaphod systemsPierre Ossman2023-03-081-1/+9
|/ | | | | | | The coordinates we get are relative the root window of each screen, so we can only trust them if we are on the same screen. So let's explicitly check that we are still getting events from the expected screen by checking the root window field of the event.
* Merge "Pixel" type in to PixelFormat headerPierre Ossman2023-02-181-1/+0
| | | | | It's a type specific to that class, so let's keep them close for clarity.
* Use operator overloading for comparisonPierre Ossman2023-02-041-1/+1
| | | | | It is much more natural than custom methods for this very common operation.
* Remove unused rfb/util.h includesPierre Ossman2023-02-042-0/+2
| | | | | | | | These files don't use anything from this header, so remove the include. This exposes some missing includes in other places, though. So add an explicit include in the files that were relying on an indirect inclusion.