Commit Graph

43 Commits

Author SHA1 Message Date
fufesou
998b75856d feat: Add relative mouse mode (#13928)
* feat: Add relative mouse mode

- Add "Relative Mouse Mode" toggle in desktop toolbar and bind to InputModel
- Implement relative mouse movement path: Flutter pointer deltas -> `type: move_relative` -> new `MOUSE_TYPE_MOVE_RELATIVE` in Rust
- In server input service, simulate relative movement via Enigo and keep latest cursor position in sync
- Track pointer-lock center in Flutter (local widget + screen coordinates) and re-center OS cursor after each relative move
- Update pointer-lock center on window move/resize/restore/maximize and when remote display geometry changes
- Hide local cursor when relative mouse mode is active (both Flutter cursor and OS cursor), restore on leave/disable
- On Windows, clip OS cursor to the window rect while in relative mode and release clip when leaving/turning off
- Implement platform helpers: `get_cursor_pos`, `set_cursor_pos`, `show_cursor`, `clip_cursor` (no-op clip/hide on Linux for now)
- Add keyboard shortcut Ctrl+Alt+Shift+M to toggle relative mode (enabled by default, works on all platforms)
- Remove `enable-relative-mouse-shortcut` config option - shortcut is now always available when keyboard permission is granted
- Handle window blur/focus/minimize events to properly release/restore cursor constraints
- Add MOUSE_TYPE_MASK constant and unit tests for mouse event constants

Note: Relative mouse mode state is NOT persisted to config (session-only).
Note: On Linux, show_cursor and clip_cursor are no-ops; cursor hiding is handled by Flutter side.

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

* feat(mouse): relative mouse mode, exit hint

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

* refact(relative mouse): shortcut

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

---------

Signed-off-by: fufesou <linlong1266@gmail.com>
2026-01-09 10:03:14 +08:00
Jonathan Gilbert
fa9260c763 Made the import of hbb_common::sysinfo::System more precisely conditioned in src/platform/mod.rs. (#13388) 2025-11-02 21:19:44 +08:00
fufesou
a22f2108c6 refact: suppress warns on macos (#12449)
Signed-off-by: fufesou <linlong1266@gmail.com>
2025-08-18 15:09:11 +08:00
fufesou
ca00706a38 feat, update, win, macos (#11618)
Signed-off-by: fufesou <linlong1266@gmail.com>
2025-05-04 07:32:47 +08:00
21pages
88a99211f3 replace pkexec with gtk sudo (#9383)
* Fix https://github.com/rustdesk/rustdesk/issues/9286, replace pkexec
  with gtk sudo. Tested on gnome (ubuntu 22.04, debian 13), xfce (manjaro, suse), kde (kubuntu 23), lxqt (lubuntu 22), Cinnamon (mint 21.3), Mate (mint 21.2)
* Fix incorrect config of the main window opened by the tray, replace
  xdg-open with run_me, replace with dbus + run_me
* Fix `check_if_stop_service`, it causes the problem fixed in
  https://github.com/rustdesk/rustdesk/pull/8414, now revert that fix and fix itself.

Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-09-19 18:47:37 +08:00
rustdesk
e20f5dd001 fix ci 2024-09-18 13:00:15 +08:00
rustdesk
e1a6ccc100 fix ci 2024-09-18 12:37:26 +08:00
fufesou
e3f6829d02 refact: android ios, lan discovery (#9207)
* refact: android ios, lan discovery

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

* fix: build and runtime error

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

---------

Signed-off-by: fufesou <linlong1266@gmail.com>
2024-08-30 00:37:38 +08:00
21pages
cfd27c8d87 wakelock not block system sleep (#8504)
Signed-off-by: 21pages <sunboeasy@gmail.com>
2024-06-27 20:09:51 +08:00
rustdesk
5a740e891e make main window can be reopen if killed by --server for creating ipc 2024-06-19 09:27:29 +08:00
rustdesk
7ce0b225ef remove linux_headless/appimage/flatpak feature 2024-05-02 13:23:32 +08:00
fufesou
4f47d4482b refact: win, idd control (#7789)
* refact: win, idd control

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* refact: win device control, better addr of

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* refact: simple refact

Signed-off-by: fufesou <shuanglongchen@yeah.net>

---------

Signed-off-by: fufesou <shuanglongchen@yeah.net>
2024-04-22 10:37:08 +08:00
21pages
50b81c2356 fix windows wakelock, add set_display (#6623)
Signed-off-by: 21pages <pages21@163.com>
2023-12-05 21:32:44 +08:00
21pages
2de1c62daf wake lock for all connection type
Signed-off-by: 21pages <pages21@163.com>
2023-11-25 17:43:07 +08:00
21pages
bd81e4d0fb android video service wakelock
Signed-off-by: 21pages <pages21@163.com>
2023-11-24 12:02:45 +08:00
dignow
c10fc26cce fix build, android
Signed-off-by: dignow <linlong1265@gmail.com>
2023-10-14 12:26:27 +08:00
21pages
d0173fbdc5 install service period protection
how to reproduce:
install, click stop service, click start service and click no
on uac, it'll show "Service is not running" but can be connected.

Signed-off-by: 21pages <pages21@163.com>
2023-09-11 16:04:51 +08:00
dignow
e978d1d0fd fix build
Signed-off-by: dignow <linlong1265@gmail.com>
2023-08-01 09:56:46 +08:00
dignow
4009fd77e8 init sync file clipboard, local to remote
Signed-off-by: dignow <linlong1265@gmail.com>
2023-07-31 21:40:55 +08:00
rustdesk
afd77181ff println in winmain 2023-07-08 12:34:40 +08:00
rustdesk
96741e5270 fix commit 2023-05-25 17:29:15 +08:00
rustdesk
63129582cc stupid warn position 2023-05-25 17:25:52 +08:00
fufesou
b36a3f70fb change resolution, macos needs more tests
Signed-off-by: fufesou <shuanglongchen@yeah.net>
2023-05-24 22:50:53 +08:00
fufesou
afe07dde6f do not enable linux_headless when flatpak or appimage is enabled
Signed-off-by: fufesou <shuanglongchen@yeah.net>
2023-04-09 11:35:14 +08:00
fufesou
73358502e9 linux headless feature, tmp commit
Signed-off-by: fufesou <shuanglongchen@yeah.net>
2023-04-03 13:16:58 +08:00
fufesou
30375a9853 refact linux desktop env
Signed-off-by: fufesou <shuanglongchen@yeah.net>
2023-04-03 13:16:51 +08:00
fufesou
10eddc139c linux virtual display, init commit
Signed-off-by: fufesou <shuanglongchen@yeah.net>
2023-04-03 13:16:49 +08:00
asur4s
0f72af6529 Release modifier when multi conn 2023-03-31 13:01:20 +08:00
asur4s
aace91ac5a Fix ci 2023-03-29 00:41:27 -07:00
asur4s
bd7901af00 Release modifiers when exit 2023-03-28 21:49:22 -07:00
fufesou
8cb361c51e remove android build warns
Signed-off-by: fufesou <shuanglongchen@yeah.net>
2023-03-27 21:11:07 +08:00
RustDesk
8b229f304d Merge pull request #3719 from chiehw/win-linux
translate mode: support linux in server
2023-03-20 15:55:24 +08:00
chiehw
44560b687e fix format 2023-03-20 10:13:06 +08:00
asur4s
6ffa2cacb1 Clean remapped keycodes when breakdown 2023-03-19 19:02:59 -07:00
rustdesk
706e080071 fix #3328 2023-03-20 00:56:17 +08:00
rustdesk
c5d7e5dfda fix: #3369 2023-03-02 13:32:21 +08:00
21pages
91a2a5b56e win resolution && api
Signed-off-by: 21pages <pages21@163.com>
2023-02-24 09:14:13 +08:00
Asura
3b60304d14 refactor: keyboard of client 2022-12-08 09:03:41 +08:00
fufesou
6b3c2f3beb fix android build errors and warnings
Signed-off-by: fufesou <shuanglongchen@yeah.net>
2022-11-13 18:29:05 +08:00
rustdesk
c1bad84a86 100% open source 2022-05-12 17:35:25 +08:00
rustdesk
d87f29c679 traditional chinese 2022-02-12 11:50:39 +08:00
rustdesk
2adc774d8a fix on linux 2021-05-02 21:19:48 +08:00
rustdesk
d1013487e2 source code 2021-03-29 15:59:14 +08:00