[fix] synchronize Linux Wayland cursor shapes

This commit is contained in:
dijunkun
2026-08-27 09:41:36 +08:00
parent d6d0a548b2
commit 126f455681
15 changed files with 920 additions and 117 deletions
+1 -35
View File
@@ -15,6 +15,7 @@
#include <string>
#include "display_info.h"
#include "remote_cursor_shape.h"
using json = nlohmann::json;
namespace crossdesk {
@@ -71,41 +72,6 @@ typedef struct {
KeyboardStateKey pressed_keys[kMaxKeyboardStateKeys];
} KeyboardState;
// Keep these values aligned with Slint's MouseCursor enum. The wire protocol
// intentionally carries a semantic cursor instead of a platform handle so a
// Windows, macOS or Linux host can control a different desktop platform.
enum class RemoteCursorShape : uint8_t {
default_cursor = 0,
none,
help,
pointer,
progress,
wait,
crosshair,
text,
alias,
copy,
move,
no_drop,
not_allowed,
grab,
grabbing,
col_resize,
row_resize,
n_resize,
e_resize,
s_resize,
w_resize,
ne_resize,
nw_resize,
se_resize,
sw_resize,
ew_resize,
ns_resize,
nesw_resize,
nwse_resize,
};
typedef struct {
uint32_t seq;
bool visible;