-
Notifications
You must be signed in to change notification settings - Fork 314
[Linux] Fix incorrectly mapped move & drag icons #1344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7301,23 +7301,23 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode | |
|
|
||
| for (int i = 0; i < CURSOR_MAX; i++) { | ||
| static const char *cursor_file[] = { | ||
| "left_ptr", | ||
| "xterm", | ||
| "hand2", | ||
| "cross", | ||
| "watch", | ||
| "left_ptr_watch", | ||
| "fleur", | ||
| "dnd-move", | ||
| "crossed_circle", | ||
| "v_double_arrow", | ||
| "h_double_arrow", | ||
| "size_bdiag", | ||
| "size_fdiag", | ||
| "move", | ||
| "row_resize", | ||
| "col_resize", | ||
| "question_arrow" | ||
| "left_ptr", // CURSOR_ARROW | ||
| "xterm", // CURSOR_IBEAM | ||
| "hand2", // CURSOR_POINTING_HAND | ||
| "cross", // CURSOR_CROSS | ||
| "watch", // CURSOR_WAIT | ||
| "left_ptr_watch", // CURSOR_BUSY | ||
| "grab", // CURSOR_DRAG | ||
| "dnd-move", // CURSOR_CAN_DROP | ||
| "crossed_circle", // CURSOR_FORBIDDEN | ||
| "v_double_arrow", // CURSOR_VSIZE | ||
| "h_double_arrow", // CURSOR_HSIZE | ||
| "size_bdiag", // CURSOR_BDIAGSIZE | ||
| "size_fdiag", // CURSOR_FDIAGSIZE | ||
| "fleur", // CURSOR_MOVE | ||
| "row_resize", // CURSOR_VSPLIT | ||
| "col_resize", // CURSOR_HSPLIT | ||
| "question_arrow" // CURSOR_HELP | ||
| }; | ||
|
|
||
| cursor_img[i] = XcursorLibraryLoadImage(cursor_file[i], cursor_theme, cursor_size); | ||
|
|
@@ -7359,7 +7359,7 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode | |
| fallback = "bd_double_arrow"; | ||
| break; | ||
| case CURSOR_MOVE: | ||
| cursor_img[i] = cursor_img[CURSOR_DRAG]; | ||
| fallback = "fleur"; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
# Locate and inspect the relevant X11 cursor fallback logic.
file="platform/linuxbsd/x11/display_server_x11.cpp"
if [ ! -f "$file" ]; then
echo "ERROR: $file not found"
git ls-files | rg 'platform/.*/x11/display_server_x11\.cpp|display_server_x11\.cpp' || true
exit 0
fi
echo "== file size =="
wc -l "$file"
echo "== context 7290-7385 =="
sed -n '7290,7385p' "$file" | nl -ba -v7290
echo "== cursor move occurrences =="
rg -n 'CURSOR_MOVE|fallback = "fleur"|_load.*cursor|cursor_theme|load.*Image' "$file"Repository: Redot-Engine/redot-engine Length of output: 294 🏁 Script executed: #!/bin/bash
set -euo pipefail
file="platform/linuxbsd/x11/display_server_x11.cpp"
echo "== context 7290-7385 =="
sed -n '7290,7385p' "$file"
echo "== cursor move occurrences and relevant nearby patterns =="
rg -n 'CURSOR_MOVE|fallback = "fleur"|fallback =|XCursor|Image|Cursor|load|theme|_load' "$file" | rg -n 'CURSOR_MOVE|fallback = "fleur"|fallback =|XCursor|Image|Cursor|load|theme|_load' | head -80Repository: Redot-Engine/redot-engine Length of output: 7837 Use a distinct fallback for
🤖 Prompt for AI Agents |
||
| break; | ||
| case CURSOR_VSPLIT: | ||
| fallback = "sb_v_double_arrow"; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: Redot-Engine/redot-engine
Length of output: 6963
🏁 Script executed:
Repository: Redot-Engine/redot-engine
Length of output: 50382
Align the
CURSOR_CAN_DROPcursor resource with panning.CURSOR_CAN_DROPis the panning cursor shape on Linux, but the theme-backed cursor load paths use drag-and-drop move cursors. In bothplatform/linuxbsd/wayland/wayland_thread.cpp#L349andplatform/linuxbsd/x11/display_server_x11.cpp#L7311, use the closed-hand cursor resource forCURSOR_CAN_DROP; keep the fallback compatible for X11 as needed.📍 Affects 2 files
platform/linuxbsd/wayland/wayland_thread.cpp#L348-L355(this comment)platform/linuxbsd/x11/display_server_x11.cpp#L7310-L7311🤖 Prompt for AI Agents