Commit Graph

53 Commits

Author SHA1 Message Date
fufesou
16088cfc80 Synchronize custom-scrollbar cursor geometry after relayout 2026-09-13 14:53:47 +08:00
fufesou
b630f14483 Synchronize edge-scroll cursor geometry after relayout
Refresh edge-scroll fractions from laid-out scroll positions and repaint when
they differ from the values used by the frame. Preserve the repaint when a
deferred settings refresh has already changed the model.

Cover DPR changes, viewport clamping, detached scroll axes and restoration
with the actual video and cursor widgets in Original and Custom modes.

Verified 87 native Flutter cursor tests on each of macOS and Linux, plus
17 Chrome Web cursor tests.
2026-09-13 13:27:46 +08:00
fufesou
d2d7c83602 Keep edge-scroll fractions valid after clamped jumps 2026-09-13 12:04:05 +08:00
fufesou
d2561f7f6b Align remote cursor overlays with edge-scrolled video 2026-09-13 11:04:55 +08:00
fufesou
70c50402a2 Keep resized Web cursors within a proportional minimum 2026-09-13 10:58:34 +08:00
fufesou
bbc8ee3bdb Align painted cursors with Linux texture origins
Use the truncated Linux texture origin while preserving fractional cursor positions and hotspots. Compare painted cursor geometry with the actual video widget in the existing regression tests.
2026-09-13 10:04:12 +08:00
fufesou
32e9895294 Fix predefined cursor density and scrollbar centering 2026-09-13 00:18:06 +08:00
fufesou
feff308f11 test: reduce duplicate cursor fixtures and geometry checks 2026-09-12 23:32:26 +08:00
fufesou
1fabdd6a9c Preserve Windows cursor alpha during native image decoding 2026-09-12 22:52:36 +08:00
fufesou
afdd1d5c9d Preserve the macOS cursor wire alpha format for older controllers 2026-09-12 21:47:08 +08:00
fufesou
371e5e8f2d Fix native cursor display selection during local movement 2026-09-12 21:46:28 +08:00
fufesou
8dfff101f8 fix(cursor): align painted and native minimum sizes 2026-09-12 20:01:26 +08:00
fufesou
6934b3cb14 fix(cursor): follow Linux video pixel scale 2026-09-12 19:56:55 +08:00
fufesou
8f3beba2d1 fix(cursor): decode legacy macOS alpha for native cursors 2026-09-12 18:40:27 +08:00
fufesou
cb068ba5df fix(cursor): decode predefined PNG images with correct alpha
Use Flutter's PNG codec before native rasterization and retain the straight-alpha image cache. Cover both bundled assets through PNG and Windows BGRA registration.
2026-09-12 17:46:57 +08:00
fufesou
aea8e2a4a6 fix(cursor): preserve macOS alpha through Web decode and resize 2026-09-12 15:51:22 +08:00
fufesou
d65faca21f fix(cursor): preserve unzoomed Web size across browser DPRs 2026-09-12 15:42:47 +08:00
fufesou
85e7c72ccd test(cursor): clarify scale constraints and isolate DPR checks 2026-09-12 14:32:15 +08:00
fufesou
a3bfe075d5 test(cursor): reuse painting and web fixtures 2026-09-12 14:28:41 +08:00
fufesou
7e2e9b68da test(cursor): consolidate native DPI and bridge coverage 2026-09-12 14:26:00 +08:00
fufesou
54881092b7 refactor(cursor): separate native capture from rendering fixes 2026-09-12 10:40:23 +08:00
fufesou
34ceb16b63 fix(cursor): align the remote cursor with scrollbar offsets 2026-09-12 06:57:15 +08:00
fufesou
daafa09318 fix(cursor): keep the Windows minimum in logical pixels 2026-09-12 03:33:38 +08:00
fufesou
96cd5cd1e2 fix(cursor): align Web hotspots with rounded cursor images 2026-09-12 03:29:27 +08:00
fufesou
db7c48e1a7 fix(cursor): normalize native cursor density in scaled views 2026-09-12 02:57:37 +08:00
fufesou
844bf40703 fix(cursor): align the painted cursor with the remote image 2026-09-12 02:24:31 +08:00
fufesou
1061670368 fix(cursor): delegate native image scaling to cursor plugin
Use the original Flutter image and source hotspot with explicit DPR, retaining the existing view and minimum-size policies. Pin the plugin implementation from rustdesk-org/flutter_custom_cursor#1.
2026-09-12 01:40:26 +08:00
fufesou
8da629c57d revert(cursor): return to f5b98b32 before splitting plugin changes 2026-09-12 00:32:58 +08:00
fufesou
5f4bb00007 fix(web): align cursor bitmap and hotspot rounding 2026-09-12 00:20:28 +08:00
fufesou
a7f1eb4c25 fix(cursor): address sizing and capture review findings 2026-09-12 00:19:10 +08:00
fufesou
be5fb304d4 fix(flutter): align painted cursor with the software image origin 2026-09-11 17:54:56 +08:00
fufesou
fdd67a875b test(flutter): cover local cursor sizing and mode switches 2026-09-11 16:02:52 +08:00
fufesou
7bb3fe6b5a fix(flutter): preserve cursor minimum sizes and native hotspots 2026-09-11 13:51:24 +08:00
fufesou
d202a2fba4 fix(flutter): scale the remote cursor with its image 2026-09-11 13:51:24 +08:00
fufesou
72ea38ca4f fix(cursor): preserve native pixels and hotspots across display scales
Capture actual Mutter and DXGI cursor metadata, preserve Retina artwork, and invalidate cursor identities when physical pixels or DPI change. Keep straight-alpha colors during native cursor resizing and correct the Windows XOR outline offset.

Verified all six Mac/Linux/Windows directions with real pointer movement, arrow/I-beam/crosshair transitions, adaptive zoom off/on/off, Original view, and live DPI changes. Requested debug builds and focused native/Flutter regressions pass.
2026-09-11 11:49:04 +08:00
fufesou
f96d00d9d1 fix(flutter): correct cursor scaling and Linux cursor clipping
Keep Linux/macOS bitmap sizing and painted cursor DPI
conversion consistent, and derive hotspots from the actual scaled bitmap.

Pad tall Linux native cursor buffers with transparency to
preserve the lower half in the hardware cursor plane.
Cover bitmap sizing, hotspots, artwork preservation,
and painting with focused regression tests.
2026-09-10 21:56:25 +08:00
fufesou
03a7fc5992 fix(flutter): align terminal shortcuts with platform conventions (#15970)
* fix(flutter): align terminal shortcuts with platform conventions

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(flutter): handle Linux terminal paste with modifier locks

Detect platform-specific paste shortcuts so Ctrl+Shift+V bypasses
virtual Ctrl/Alt modifiers on Linux. Add regression coverage.

Signed-off-by: fufesou <linlong1266@gmail.com>

---------

Signed-off-by: fufesou <linlong1266@gmail.com>
2026-08-27 16:33:58 +08:00
fufesou
0b08a83d4b fix(file-transfer): improve large directory loading (#15830)
* fix(file-transfer): improve large directory loading

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(file-transfer): avoid failing newer directory reads

Track each remote directory request by its registered completer and only remove
the task when it still matches, preventing stale failures from affecting newer
requests for the same path.

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(file-transfer): handle slow directory listings safely

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(file transfer): correlate directory responses with requests

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(file transfer): prevent automatic directory responses from matching requests

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(file-transfer): handle large remote directory listings reliably

- build file rows lazily
- register remote reads before sending requests
- handle Home paths, stale responses, errors, and timeouts
- serialize same-path reads with different hidden-file options

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(file transfer): reduce diffs

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix: build

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix: invalidate pending dir reads on reconnect

Signed-off-by: fufesou <linlong1266@gmail.com>

* test(file-transfer): cover remote directory read lifecycle

Signed-off-by: fufesou <linlong1266@gmail.com>

---------

Signed-off-by: fufesou <linlong1266@gmail.com>
2026-08-27 13:01:11 +08:00
fufesou
92eb137178 feat(terminal): use platform-native copy and paste shortcuts (#15931) 2026-08-21 21:20:39 +08:00
fufesou
0a4b431ea2 fix: correct terminal mouse selection and scroll coordinates (#15915)
Signed-off-by: fufesou <linlong1266@gmail.com>
2026-08-20 13:10:45 +08:00
RustDesk
ff07ff7f13 fix(terminal): send SGR mouse wheel reports with the button codes app… (#15817)
* fix(terminal): send SGR mouse wheel reports with the button codes apps expect

xterm.dart 4.0.0 encodes the wheel buttons as 64+4..64+7 rather than
64+0..64+3, so the low bits land on the modifier field and every wheel
report the terminal emits reads as wheel-with-Shift. Strict full-screen
applications reject the modified event, which is why neither the mouse
wheel nor the trackpad scrolls anything once the peer application takes
over the alternate screen.

Install a mouse handler that keeps every upstream reporting decision and
only re-encodes the wheel buttons as 64..67. Non-wheel reports pass
through untouched, and the emitted bytes stay identical once upstream
ships the same fix, so this can be dropped without a behavior change.

Upstream: TerminalStudio/xterm.dart#238

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(terminal): correct the wheel report row, drop the wasted report build

Address review feedback on the wheel button fix:

- The X10/utf row was encoded as `32 + y + 1` while y is already 1-based, so
  every normal-mode report pointed one row too low and the `y > limit` guard
  disagreed with what it emitted.
- Gate the wheel path on `mouseMode.reportScroll` and the button state instead
  of building and discarding a full report string from `defaultMouseHandler`
  on every scroll tick. This also makes the hardcoded SGR 'M' provably right,
  since a wheel release now returns before the report is built.
- Derive the wire code as `id - 4` and drop `_wheelButtonId`, whose `default`
  branch was unreachable and defeated enum exhaustiveness.
- Assign `mouseHandler` after construction so the `Terminal(...)` line stays
  untouched.

Cover the utf, urxvt, null-byte overflow and click-only branches, and assert
that TerminalModel actually installs the handler.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-11 13:54:57 +08:00
dongrencd
57456f0b52 feat(terminal): add Ctrl and Alt toggles to mobile terminal keyboard (#15532)
* feat(terminal): add Ctrl toggle and Ctrl+X shortcut keys to mobile terminal floating keyboard

Signed-off-by: dongrencd <dongrencd@users.noreply.github.com>

* refactor(terminal): restructure keyboard layout with collapse button

- Move | from Row1 position 3 to Row1 end (aligned with collapse button)
- Remove ~ from Row2, add collapse button (∨/∧) after PgDn
- Row3: conditional render, add ~ and -, remove trailing placeholders
- Collapse state persisted via kOptionEnableShowTerminalCtrlKeys
- Row3 defaults to collapsed for compact layout

Signed-off-by: dongrencd <dongrencd@users.noreply.github.com>

* fix(terminal): restore trailing placeholders in Row3 for alignment

Row3 needs trailing placeholders to match Row1/Row2 width (348px)
so Ctrl aligns with Tab in Row2 and Esc in Row1.

Signed-off-by: dongrencd <dongrencd@users.noreply.github.com>

* fix(terminal): update mobile keyboard layout per review

Signed-off-by: dong.ren.cd <dong.ren.cd@tcl.com>

* fix(terminal): address mobile keyboard review regressions

Signed-off-by: dong.ren.cd <dong.ren.cd@tcl.com>

* fix(terminal): preserve ctrl-j newline mapping on mobile

Signed-off-by: dong.ren.cd <dong.ren.cd@tcl.com>

* fix(terminal): preserve pasted input with modifiers

Signed-off-by: dong.ren.cd <dong.ren.cd@tcl.com>

* fix(terminal): harden mobile modifier and paste input

Signed-off-by: dong.ren.cd <dong.ren.cd@tcl.com>

* fix(terminal): harden mobile paste shortcut handling

Signed-off-by: dong.ren.cd <dong.ren.cd@tcl.com>

* fix(terminal): preserve unicode graphemes under ctrl

* fix(terminal): avoid modifier scan for inactive locks

* fix(terminal): keep default hardware paste shortcuts

* fix(terminal): guard hardware paste with modifier locks

* fix(terminal): update mobile key button color role

---------

Signed-off-by: dongrencd <dongrencd@users.noreply.github.com>
Signed-off-by: dong.ren.cd <dong.ren.cd@tcl.com>
Co-authored-by: dongrencd <dongrencd@users.noreply.github.com>
Co-authored-by: dong.ren.cd <dong.ren.cd@tcl.com>
2026-07-25 22:33:16 +08:00
RustDesk
f4a0535289 autocomplete online (#15313)
* autocomplete online

* review fix

* review fix

* remove literalInput
2026-06-17 22:04:34 +08:00
Amirhosein Akhlaghpoor
c8ba99d1a1 flutter: shift after one shot IME capitalization (#14695)
* flutter: shift after one shot IME capitalization

Signed-off-by: Amirhossein Akhlaghpour <m9.akhlaghpoor@gmail.com>

* flutter: clarify stale mobile shift handling

Signed-off-by: Amirhossein Akhlaghpour <m9.akhlaghpoor@gmail.com>

* fix(android): gboard shift stuck

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(android): gboard shift stuck, remove unused param

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(android): gboard shift stuck, release shift before sending events

Signed-off-by: fufesou <linlong1266@gmail.com>

* chore(flutter): document stale mobile shift release flow

Signed-off-by: Amirhossein Akhlaghpour <m9.akhlaghpoor@gmail.com>

---------

Signed-off-by: Amirhossein Akhlaghpour <m9.akhlaghpoor@gmail.com>
Signed-off-by: fufesou <linlong1266@gmail.com>
Co-authored-by: fufesou <linlong1266@gmail.com>
2026-04-26 22:44:26 +08:00
21pages
f0f999dc27 view camera (#11040)
* view camera

Signed-off-by: 21pages <sunboeasy@gmail.com>

* `No cameras` prompt if no cameras available,  `peerGetSessionsCount` use
connType as parameter

Signed-off-by: 21pages <sunboeasy@gmail.com>

* fix, use video_service_name rather than display_idx as key in qos,etc

Signed-off-by: 21pages <sunboeasy@gmail.com>

---------

Signed-off-by: 21pages <sunboeasy@gmail.com>
Co-authored-by: Adwin White <adwinw01@gmail.com>
Co-authored-by: RustDesk <71636191+rustdesk@users.noreply.github.com>
2025-03-10 21:06:53 +08:00
21pages
6028cfc1a3 fix remote tab lable update, Get.find always return the first instance
Signed-off-by: 21pages <pages21@163.com>
2023-09-28 09:05:10 +08:00
NicKoehler
ec4a95f906 replaced buttons with switches 2023-05-18 11:41:16 +02:00
csf
c6269b54af add requestChatInputFocus() 2023-02-02 21:39:25 +09:00
csf
c100505fa1 desktop cm chat feat: disable auto jumpTo other page when current hasFocus & add unread message mark on tab 2022-10-26 23:50:36 +09:00
csf
afa94d5907 add test mode, update cm_test 2022-10-20 23:07:11 +09:00