Skip to content
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

Add size check to prevent popup bigger than the screen itself #79617

Merged
merged 1 commit into from
Feb 18, 2024

Conversation

sepTN
Copy link
Contributor

@sepTN sepTN commented Jul 18, 2023

Add size check to prevent popup bigger than the screen itself.

Fix #78594 however I'm not sure if this is the correct way to do it. Maybe if there's someone who can point me in the right direction.


First, as per the issue #78594 to cause the freeze, have a ridiculous dialog_bounds value in your:
.godot/editor/project_metadata.cfg

[editor_metadata]

executable_path="C:/godok/bin/godot.windows.editor.x86_64.exe"

[debug_options]

run_live_debug=true
run_reload_scripts=true

[recent_files]

scenes=["res://node_2d.tscn"]

[linked_properties]

Node2D:scale=true

[dialog_bounds]

project_settings=Rect2(55, 55, 99999, 99999)

Second, open your Project Settings.

Before (without this pr)

  • The Godot Engine will freeze when you try to open Project Settings
    image

After (with this pr applied)

  • The editor will not spawn popup bigger than the user's screen, no more freeze.
  • The window might be off for a bit, but at least now the user can drag it back again and resize it.
    image

@sepTN sepTN force-pushed the add-screensize-check-popup branch 2 times, most recently from 3eb17f7 to 8123453 Compare July 18, 2023 16:29
@sepTN sepTN marked this pull request as draft July 18, 2023 16:51
@sepTN sepTN force-pushed the add-screensize-check-popup branch from 38c4961 to 8afdde8 Compare July 18, 2023 18:09
@sepTN sepTN marked this pull request as ready for review July 18, 2023 18:46
@YuriSizov YuriSizov added this to the 4.2 milestone Jul 18, 2023
scene/main/window.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@Sauermann Sauermann left a comment

Choose a reason for hiding this comment

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

While I haven't tested the PR, the changes seem to solve the linked issue and I don't see any obvious problems with the implementation.

@sepTN
Copy link
Contributor Author

sepTN commented Feb 18, 2024

Thanks! I'll git squash to a single commit in a bit.

@akien-mga akien-mga merged commit dfcecb7 into godotengine:master Feb 18, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@akien-mga akien-mga added cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release labels Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release topic:editor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Project Settings freezes up Godot Engine
6 participants