Commit Graph
4481 Commits
Author SHA1 Message Date
sithlord48 161b72e43d refactor: Use mutex to protect m_time in MSWindowsClipboard 2026-06-19 08:26:51 -04:00
sithlord48 698ebc30b3 refactor: Use mutex to protect m_open / m_time in EiClipboard 2026-06-19 08:26:51 -04:00
sithlord48 0042b43bac refactor: use Mutex to protect vars in XWindowClipboard 2026-06-19 08:26:51 -04:00
sithlord48 81e6e13d94 refactor: Use Mutex to protect m_open and m_time in Clipboard.cpp 2026-06-19 08:26:51 -04:00
sithlord48 5eb1d7068e refactor: declare vars where they are used in if statements 2026-06-19 08:14:54 -04:00
sithlord48 31018910f8 refactor KeySqquenceWidget::event join identical cases 2026-06-19 08:14:54 -04:00
sithlord48 f52fdec236 refactor: make PortalRemoteDesktop:handleSessionTransfer a const 2026-06-19 08:14:54 -04:00
sithlord48 a42b6cf897 refactor: make PortalRemoteDesktop:handleSessionOwnerChanged a const 2026-06-19 08:14:54 -04:00
sithlord48 710aae5f3f refactor: make PortalRemoteDesktop::claimClipboard a const 2026-06-19 08:14:54 -04:00
sithlord48 e800512160 refactor: PortalInputCapture remove extra private section in header 2026-06-19 08:14:54 -04:00
sithlord48 cc35a3dc7d refactor: make PortalInputCapture::HandleSelectionTransfer const 2026-06-19 08:14:54 -04:00
sithlord48 9196b23f50 refactor: make PortalInputCapture::claimClipbaordOwnership const 2026-06-19 08:14:54 -04:00
sithlord48 cd1652b758 reactor: mark that session var maybe unused 2026-06-19 08:14:54 -04:00
sithlord48 4f5fdbca11 refactor: make PortalInputCapture::readClipboardSelection const 2026-06-19 08:14:54 -04:00
sithlord48 9f7dbe46ef refactor: make ServerConfigDialog::initConnections const 2026-06-19 08:14:54 -04:00
sithlord48 3fc0aaec5e refactor: change server clipboard grab messages to DEBUG level 2026-06-19 08:13:24 -04:00
sithlord48 74440b9d7a fix: make QApp first in deskflow-core 2026-06-19 08:09:28 -04:00
sithlord48andNick Bolton ace44500d0 fix: do add existing aliases to the alias list, correctly remove items in the list before saving 2026-06-19 12:39:47 +01:00
sithlord48andNick Bolton e58c41ac5e refactor(Settings): Move clipboard size to the general config , store as a mb value convert to expected size on when adding the option 2026-06-19 12:25:28 +01:00
sithlord48andNick Bolton 4fd0bf7e1e refactor(Settings): move clipboardSharing -> enableClipboard and to main config 2026-06-19 12:25:28 +01:00
sithlord48andNick Bolton df3746777b chore: remove unused wl-clipboard support 2026-06-18 22:06:37 +01:00
sithlord48andNick Bolton 16cd4695cc refactor: do not save empty xdgtokens 2026-06-18 22:06:37 +01:00
Nick Bolton 03a4800677 feat: clipboard support for portal remote desktop
Add libportal clipboard handling to the remote desktop.
Supports both directions (server to Wayland client paste,
and copy from the Wayland client back to the server)
for UTF-8 text, plain text, and PNG/BMP images.

The shared mime-type table, BMP/DIB and PNG encode/decode helpers, and
portal selection read/write live in a new PortalClipboard
helper used by both PortalInputCapture and PortalRemoteDesktop.

If the portal returns a restored RemoteDesktop session without clipboard
enabled (a token persisted before clipboard support existed), discard
the restore token and reconnect so the user gets a fresh permission
dialog. Otherwise the session would loop with a clipboard-less token
forever.
2026-06-18 22:06:37 +01:00
Nick Bolton 66cb367473 fix: skip clipboard selection transfer if clipboard is active 2026-06-18 22:06:37 +01:00
Nick Bolton 67f6f893fa refactor: drop redundant clipboard read on selection owner change 2026-06-18 22:06:37 +01:00
d7d3f8d4c8 feat: inputcapture clipboard support
Send the clipboard over the libportal InputCapture portal. Only built
if the installed libportal has clipboard support.

AI disclosure: Claude was used on both sides of this work.
- Peter Hutterer: "The second commit was purely written by Claude
  after I stared at this for too long without seeing any hope of
  getting started. Turns out Claude wrote something that at least
  looks correct and it does work. It needs review but also needs
  knowledge of deskflow's internals that I don't have..."
- Nick Bolton: Claude also assisted with the follow-up work listed
  below (image copy/paste, session re-request, race fixes, size/mime
  validation, and CMake detection).

Server side (Wayland host, Peter Hutterer):
- Initial scaffolding for inputcapture clipboard support, guarded so it
  only builds when the portal exposes the clipboard API.
- Integrate clipboard data into the inputcapture session so the host
  clipboard can be offered to the remote (the Claude-written commit
  referenced above).

Client side (Wayland receiver, KoljaFrahm):
- Receive clipboard data from the server and feed it into the local
  clipboard through libportal. Built on the reference code by Peter:
  https://github.com/whot/libportal-clipboard-test/tree/main

Build integration and rebase (Chris Rizzitello, sithlord48):
- Add the original CMake check for libportal/clipboard.h to define
  HAVE_LIBPORTAL_CLIPBOARD, and guard the libportal clipboard use on
  it.
- Update the code style and rebase onto the updated input capture
  session persistence: https://github.com/deskflow/deskflow/pull/9415

Image support and reliability fixes (Nick Bolton):
- Support image copy/paste in addition to text, so screenshots and
  other image clipboard contents work both ways through inputcapture.
- Re-request the input capture session when it comes up without a
  clipboard, so new testers with existing sessions can get clipboard
  functionality without needing to clear the session.
- Defer clipboard reads until the input capture session is active,
  avoiding races where reads happen before the portal is ready.
- Fix assorted style issues in original commit to match conventions.
- Check the configured clipboard size limit and validate incoming
  mime types before forwarding inputcapture clipboard data.
- Switch the CMake clipboard probe to check_symbol_exists so detection
  matches what the compiler actually sees in the headers.

Co-authored-by: Nick Bolton <[email protected]>
Co-authored-by: KoljaFrahm <[email protected]>
Co-authored-by: Chris Rizzitello <[email protected]>
2026-06-18 22:06:37 +01:00
Nick Bolton f2a3fc6596 fix: resend only the grabbed clipboard, not all clipboards
fixes assert fail in `src/lib/server/Server.cpp` `onClipboardChanged`:
`assert(sender == m_clients.find(clipboard.m_clipboardOwner)->second);`
2026-06-18 22:06:37 +01:00
Nick Bolton 1b27a5405d fix: simplify clipboard size limit logging 2026-06-18 22:06:37 +01:00
sithlord48andNick Bolton 8a68513261 fix(win32): Do not need to set manifest scaling anymore Qt uses this as default 2026-06-18 09:58:58 +01:00
sithlord48andNick Bolton c26717f38a fix(win32): Create QApp Early as possible 2026-06-18 09:58:58 +01:00
Charles Le (cle-air-m3)andNick Bolton 13f98475a2 fix: remove ClipboardSending handler in proxy destructors (UAF)
fixes: #9842
2026-06-17 12:28:51 +01:00
sithlord48andNick Bolton 750fdbeb34 refactor: rename the defaultLockToScreenState checkbox to defaultLockToComputerState 2026-06-17 10:59:37 +01:00
sithlord48andNick Bolton eb6930a062 refactor(Settings): move defaultLockToScreenState to general settings
CodeQL Analysis / codeql (push) Has been cancelled
Continuous Integration / lint-reuse (push) Has been cancelled
SonarCloud Analysis / sonar (push) Has been cancelled
Continuous Integration / ci-passed (push) Has been cancelled
Continuous Integration / test-results (push) Has been cancelled
Continuous Integration / lint-clang (push) Has been cancelled
Continuous Integration / analyze-valgrind (push) Has been cancelled
Continuous Integration / ${{ matrix.target.name }} (map[arch:amd64 config-args:-G Ninja name:windows-2022-x64 qt-version:6.10.3 runs-on:windows-2022 timeout:30 vcpkg-triplet:x64-windows-release]) (push) Has been cancelled
Continuous Integration / ${{ matrix.target.name }} (map[arch:arm64 config-args:-G Ninja name:windows-2022-arm64 qt-version:6.11.1 runs-on:windows-11-arm timeout:30 vcpkg-triplet:arm64-windows]) (push) Has been cancelled
Continuous Integration / ${{ matrix.target.name }} (map[config-args:-DCMAKE_OSX_ARCHITECTURES="arm64" -DCMAKE_OSX_DEPLOYMENT_TARGET=14 name:macos-arm64 qt-version:6.11.1 runs-on:macos-15 timeout:10]) (push) Has been cancelled
Continuous Integration / ${{ matrix.target.name }} (map[config-args:-DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET=12 -DCMAKE_OSX_SYSROOT=/Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk name:macos-x64 qt-ver… (push) Has been cancelled
Continuous Integration / ${{ matrix.target.name }} (map[config-args:-G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_DEV_DOCS=ON container:archlinux:latest like:arch name:archlinux-x86_64 runs-on:ubuntu-latest timeout:20]) (push) Has been cancelled
Continuous Integration / ${{ matrix.target.name }} (map[config-args:-G Ninja -DCMAKE_INSTALL_PREFIX=/usr container:debian:stable-slim like:debian name:debian-arm64 runs-on:ubuntu-24.04-arm timeout:20]) (push) Has been cancelled
Continuous Integration / ${{ matrix.target.name }} (map[config-args:-G Ninja -DCMAKE_INSTALL_PREFIX=/usr container:debian:stable-slim like:debian name:debian-x86_64 runs-on:ubuntu-latest timeout:20]) (push) Has been cancelled
Continuous Integration / ${{ matrix.target.name }} (map[config-args:-G Ninja -DCMAKE_INSTALL_PREFIX=/usr container:debian:testing-slim like:debian name:debian-testing-arm64 runs-on:ubuntu-24.04-arm timeout:20]) (push) Has been cancelled
Continuous Integration / ${{ matrix.target.name }} (map[config-args:-G Ninja -DCMAKE_INSTALL_PREFIX=/usr container:debian:testing-slim like:debian name:debian-testing-x86_64 runs-on:ubuntu-latest timeout:20]) (push) Has been cancelled
Continuous Integration / ${{ matrix.target.name }} (map[config-args:-G Ninja -DCMAKE_INSTALL_PREFIX=/usr container:fedora:43 like:fedora name:fedora-43-arm64 runs-on:ubuntu-24.04-arm timeout:20]) (push) Has been cancelled
Continuous Integration / ${{ matrix.target.name }} (map[config-args:-G Ninja -DCMAKE_INSTALL_PREFIX=/usr container:fedora:43 like:fedora name:fedora-43-x86_64 runs-on:ubuntu-latest timeout:20]) (push) Has been cancelled
Continuous Integration / ${{ matrix.target.name }} (map[config-args:-G Ninja -DCMAKE_INSTALL_PREFIX=/usr container:fedora:44 like:fedora name:fedora-44-arm64 runs-on:ubuntu-24.04-arm timeout:20]) (push) Has been cancelled
Continuous Integration / ${{ matrix.target.name }} (map[config-args:-G Ninja -DCMAKE_INSTALL_PREFIX=/usr container:fedora:44 like:fedora name:fedora-44-x86_64 runs-on:ubuntu-latest timeout:20]) (push) Has been cancelled
Continuous Integration / ${{ matrix.target.name }} (map[config-args:-G Ninja -DCMAKE_INSTALL_PREFIX=/usr container:opensuse/tumbleweed:latest like:suse name:opensuse-arm64 runs-on:ubuntu-24.04-arm timeout:20]) (push) Has been cancelled
Continuous Integration / ${{ matrix.target.name }} (map[config-args:-G Ninja -DCMAKE_INSTALL_PREFIX=/usr container:opensuse/tumbleweed:latest like:suse name:opensuse-x86_64 runs-on:ubuntu-latest timeout:20]) (push) Has been cancelled
Continuous Integration / ${{ matrix.target.name }} (map[config-args:-G Ninja -DCMAKE_INSTALL_PREFIX=/usr container:ubuntu:26.04 like:debian name:ubuntu-26.04-arm64 runs-on:ubuntu-24.04-arm timeout:20]) (push) Has been cancelled
Continuous Integration / ${{ matrix.target.name }} (map[config-args:-G Ninja -DCMAKE_INSTALL_PREFIX=/usr container:ubuntu:26.04 like:debian name:ubuntu-26.04-x86_64 runs-on:ubuntu-latest timeout:20]) (push) Has been cancelled
Continuous Integration / unix-${{ matrix.distro.name }} (map[name:freebsd]) (push) Has been cancelled
Continuous Integration / flatpak-${{matrix.flatpak.arch}} (map[arch:aarch64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Continuous Integration / flatpak-${{matrix.flatpak.arch}} (map[arch:x86_64 runs-on:ubuntu-latest]) (push) Has been cancelled
Continuous Integration / release (push) Has been cancelled
2026-06-16 09:59:51 +01:00
sithlord48andNick Bolton b665c730b7 refactor(Settings): move disableLockToComputer to general settings 2026-06-16 09:59:51 +01:00
sithlord48andNick Bolton 69b9baaaeb refactor(Settings): move win32keepForeground to general settings 2026-06-16 09:59:51 +01:00
sithlord48andNick Bolton 46e90e12ff refactor(Settings): move relative Mouse movement setting to general settings 2026-06-16 09:59:51 +01:00
sithlord48andNick Bolton ba37ff854f chore: remove unused clientAddress var in ServerConfig 2026-06-16 09:59:51 +01:00
sithlord48andNick Bolton 261335d6c3 refactor(Settings): move switchDoubleTap to general settings 2026-06-16 09:59:51 +01:00
sithlord48andNick Bolton ea8f3881fe refactor(Settings): move switchDelay to general settings 2026-06-16 09:59:51 +01:00
sithlord48andNick Bolton 488d620b3b refactor(Settings): Move heartbeat to general settings 2026-06-16 09:59:51 +01:00
sithlord48andNick Bolton f51fb4affb refactor: move hasSwitchDoubleTap to general settings 2026-06-12 17:51:41 +01:00
sithlord48andNick Bolton f686e3c503 refactor: mv hasSwitchDelay to general settings 2026-06-12 17:51:41 +01:00
sithlord48andNick Bolton d665b55111 refactor: move hasHeartbeat to general settings 2026-06-12 17:51:41 +01:00
sithlord48andNick Bolton c66c356665 refactor(ServerConfigDialog): add new init connections method to centeralize all connections 2026-06-12 17:51:41 +01:00
sithlord48andNick Bolton 493e2f374c refactor(ServerConfigDialog): Add a loadFromConfig method to centeralize loading 2026-06-12 17:51:41 +01:00
sithlord48andNick Bolton 76673b8cc3 refactor(ServerSettingsDialog): Always allow configuration of server protocol 2026-06-10 17:37:56 +01:00
sithlord48andNick Bolton 516f24a0ba refactor(Settings): add helper method to get network protocol as NetworkProtocol directly 2026-06-10 17:37:56 +01:00
sithlord48andNick Bolton b91a39492f refactor(settings): exclusively read proto from the general settings 2026-06-10 17:37:56 +01:00
sithlord48andNick Bolton c4f65c04a3 refactor: remove public access to serverConfig row and column info 2026-06-10 15:52:17 +01:00
sithlord48andNick Bolton 6105e4025a refactor: move numRows to general configuation server/gridHeight 2026-06-10 15:52:17 +01:00