[Linux] Fix incorrectly mapped move & drag icons - #1344
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. WalkthroughThe editor uses ChangesCursor shape updates
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The PR corrects move and pan cursor behavior on Linux without affecting data, permissions, deployment, or runtime dependencies; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
d891eef to
3d54abf
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@platform/linuxbsd/wayland/wayland_thread.cpp`:
- Around line 348-355: Update the CURSOR_CAN_DROP resource mapping to use the
closed-hand cursor for panning in platform/linuxbsd/wayland/wayland_thread.cpp
lines 348-355 and platform/linuxbsd/x11/display_server_x11.cpp lines 7310-7311;
retain an X11-compatible fallback where necessary.
In `@platform/linuxbsd/x11/display_server_x11.cpp`:
- Line 7362: Update the CURSOR_MOVE fallback assignment in the X11
cursor-loading logic so it does not reuse the primary "fleur" cursor alias; use
a different valid cursor alias or preserve the final image fallback path to
allow recovery when the primary lookup fails.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 7697d564-4fb3-43e0-bf11-278a3c507c62
📒 Files selected for processing (4)
editor/scene/canvas_item_editor_plugin.cppplatform/linuxbsd/wayland/wayland_thread.cppplatform/linuxbsd/wayland/wayland_thread.hplatform/linuxbsd/x11/display_server_x11.cpp
| "grab", | ||
| "dnd-move", | ||
| "crossed_circle", | ||
| "v_double_arrow", | ||
| "h_double_arrow", | ||
| "size_bdiag", | ||
| "size_fdiag", | ||
| "move", | ||
| "fleur", |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Locate files"
fd -a 'wayland_thread.cpp|display_server_x11.cpp|cursor.*|mouse.*' . | sed 's#^\./##' | head -100
echo
echo "Find CURSOR_CAN_DROP usages"
rg -n "CURSOR_CAN_DROP|CURSOR_GRABBING|GRABBING|grabbing|dnd-move|hand1|m_fleur|fleur" platform .github 2>/dev/null || true
echo
echo "Inspect wayland mapping area"
sed -n '300,380p' platform/linuxbsd/wayland/wayland_thread.cpp
echo
echo "Inspect X11 mapping area"
sed -n '7260,7335p' platform/linuxbsd/x11/display_server_x11.cppRepository: Redot-Engine/redot-engine
Length of output: 6963
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Search canvas viewport panning usages"
rg -n "pan_|PAN|CURSOR_CAN_DROP|CURSOR_DRAG|CursorDrag|CURSOR_MAX" scene editor platform --glob '!thirdparty/**' --glob '!doc/**' || true
echo
echo "Inspect cursor usage sites"
sed -n '340,375p' platform/linuxbsd/wayland/wayland_thread.h
sed -n '330,360p' platform/linuxbsd/wayland/wayland_thread.cpp
sed -n '7330,7350p' platform/linuxbsd/x11/display_server_x11.cpp
echo
echo "Search cursor_can_drop identifier"
rg -n "cursor_can_drop|_can_drop|SetCursorCanDrop|set_cursor_can_drop" platform editor scene --glob '!thirdparty/**' --glob '!doc/**' || trueRepository: Redot-Engine/redot-engine
Length of output: 50382
Align the CURSOR_CAN_DROP cursor resource with panning.
CURSOR_CAN_DROP is the panning cursor shape on Linux, but the theme-backed cursor load paths use drag-and-drop move cursors. In both platform/linuxbsd/wayland/wayland_thread.cpp#L349 and platform/linuxbsd/x11/display_server_x11.cpp#L7311, use the closed-hand cursor resource for CURSOR_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
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@platform/linuxbsd/wayland/wayland_thread.cpp` around lines 348 - 355, Update
the CURSOR_CAN_DROP resource mapping to use the closed-hand cursor for panning
in platform/linuxbsd/wayland/wayland_thread.cpp lines 348-355 and
platform/linuxbsd/x11/display_server_x11.cpp lines 7310-7311; retain an
X11-compatible fallback where necessary.
3d54abf to
39b3562
Compare
|
@coderabbitai Please confirm if latest push resolves your 2 comments. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="Redot-Engine/redot-engine"
pr="1344"
echo '=== CodeRabbit review comments ==='
gh api "repos/${repo}/pulls/${pr}/comments?per_page=100" \
--paginate \
--jq '.[] | select(.user.login == "coderabbitai") | {id, path, line, original_line, body, commit_id}' || true
echo '=== PR files and latest head ==='
gh pr view "$pr" --repo "$repo" --json headRefOid,files \
--jq '{headRefOid, files: [.files[] | {path, additions, deletions}]}' || true
echo '=== Relevant source outlines ==='
for file in \
editor/scene/canvas_item_editor_plugin.cpp \
platform/linuxbsd/wayland/wayland_thread.cpp \
platform/linuxbsd/wayland/wayland_thread.h \
platform/linuxbsd/x11/display_server_x11.cpp
do
if [ -f "$file" ]; then
echo "--- $file ---"
ast-grep outline "$file" --items all || true
fi
done
echo '=== Latest PR diff ==='
git diff --unified=40 "origin/$(git remote show origin | sed -n '/HEAD branch/s/.*: //p')"...HEAD -- \
editor/scene/canvas_item_editor_plugin.cpp \
platform/linuxbsd/wayland/wayland_thread.cpp \
platform/linuxbsd/wayland/wayland_thread.h \
platform/linuxbsd/x11/display_server_x11.cpp || trueLength of output: 80197 🏁 Script executed: #!/bin/bash
set -euo pipefail
repo_owner="Redot-Engine"
repo_name="redot-engine"
pr_number="1344"
echo '=== Review threads ==='
gh api graphql \
-F owner="$repo_owner" \
-F name="$repo_name" \
-F number="$pr_number" \
-f query='
query($owner: String!, $name: String!, $number: Int!) {
repository(owner: $owner, name: $name) {
pullRequest(number: $number) {
reviewThreads(first: 100) {
nodes {
isResolved
path
line
originalLine
comments(first: 20) {
nodes {
author { login }
body
url
createdAt
}
}
}
}
}
}
}' \
--jq '.data.repository.pullRequest.reviewThreads.nodes[]
| select([.comments.nodes[].author.login] | any(. == "coderabbitai"))
| {isResolved, path, line, originalLine, comments}' || true
echo '=== Top-level CodeRabbit comments ==='
gh api "repos/${repo_owner}/${repo_name}/issues/${pr_number}/comments?per_page=100" \
--paginate \
--jq '.[] | select(.user.login == "coderabbitai") | {created_at, body, html_url}' || trueLength of output: 8249
You are interacting with an AI system. |
Woulda helped if I had staged my changes first 🥇 |
39b3562 to
7f6b5b8
Compare
7f6b5b8 to
55acd3c
Compare
|
Ok long as the tests complete ok, this should be good now. |
Currently, both X11 & Wayland have incorrect icons for move & pan (2D view).

Not the icons themselves, but the mouse cursor displayed when clicking on/using them.
Wayland:
X11:
This PR fixes both.
Summary by CodeRabbit
Summary by CodeRabbit