1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-06 19:41:11 +00:00

Merge pull request #113656 from deralmas/gray-goo-scenario

Wayland: Work around window scale ambiguity
This commit is contained in:
Rémi Verschelde
2025-12-16 11:26:42 +01:00
7 changed files with 37 additions and 2 deletions

View File

@@ -236,6 +236,11 @@ void WindowWrapper::restore_window_from_saved_position(const Rect2 p_window_rect
int screen = p_screen;
Rect2 restored_screen_rect = p_screen_rect;
if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_SELF_FITTING_WINDOWS)) {
window_rect = Rect2i();
restored_screen_rect = Rect2i();
}
if (screen < 0 || screen >= DisplayServer::get_singleton()->get_screen_count()) {
// Fallback to the main window screen if the saved screen is not available.
screen = get_window()->get_window_id();