Skip to content

Conversation

@AR-DEV-1
Copy link

@AR-DEV-1 AR-DEV-1 commented Jan 19, 2026

  • Allows X11 to move a game to another screen/display
  • Tested & works as expected
  • Ports Godot's PR#114820 to Redot (which was also created by me)

Note

Contributed by 2LazyDevs.

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Fixed an issue on Linux where fullscreen and maximized windows could not be properly repositioned or moved between displays. These windows are now temporarily switched to windowed mode during the operation and restored to their original state.

✏️ Tip: You can customize this high-level summary in your review settings.

speratus and others added 3 commits October 15, 2025 22:22
* Add missing `NodePath.Slice()` method to the C# API

* Fix syntax error due to missing parenthesis.

* Replace space indentation with tab

* Fix incorrect type name
Merge changes from 26.1-beta to master
@coderabbitai
Copy link

coderabbitai bot commented Jan 19, 2026

Walkthrough

Modified the window screen positioning logic in DisplayServerX11 to temporarily switch fullscreen or maximized windows to windowed mode before repositioning, then restore their original mode afterward.

Changes

Cohort / File(s) Summary
Window Mode Transition
platform/linuxbsd/x11/display_server_x11.cpp
Added temporary mode switch mechanism in window_set_current_screen: captures current window mode, transitions to windowed mode for move/resize operations, and restores original mode upon completion.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: enabling window movement to another screen/display when in fullscreen or maximized mode on X11.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@platform/linuxbsd/x11/display_server_x11.cpp`:
- Around line 2309-2315: The restore path currently calls XMoveResizeWindow to
move/resize the native window but then immediately calls
window_set_mode(current_mode, p_window) while internal state
(wd.position/wd.size) is stale; update the internal state before restoring mode
by calling the appropriate setter(s) (e.g., window_set_position and/or
window_set_size) or otherwise assign wd.position and wd.size from
screen_get_position(screen)/screen_get_size(screen) so that
window_set_mode(current_mode, p_window) sees the new position/size; locate this
logic around window_get_mode/window_set_mode, XMoveResizeWindow and wd to apply
the state sync prior to the final window_set_mode call.

@Arctis-Fireblight Arctis-Fireblight changed the base branch from master to dev January 25, 2026 04:12
@Arctis-Fireblight Arctis-Fireblight merged commit a5aedf1 into Redot-Engine:dev Jan 25, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants