Skip to content

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

Merged
akien-mga merged 1 commit into
godotengine:masterfrom
sepTN:add-screensize-check-popup
Feb 18, 2024
Merged

Add size check to prevent popup bigger than the screen itself#79617
akien-mga merged 1 commit into
godotengine:masterfrom
sepTN:add-screensize-check-popup

Conversation

@sepTN

@sepTN sepTN commented Jul 18, 2023

Copy link
Copy Markdown
Contributor

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 requested a review from a team as a code owner July 18, 2023 15:28
Comment thread scene/main/window.cpp Outdated
@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
Comment thread scene/main/window.cpp Outdated
@sepTN
sepTN force-pushed the add-screensize-check-popup branch from b12c297 to 38095eb Compare July 19, 2023 12:35
@sepTN
sepTN requested a review from bruvzg July 24, 2023 07:19
@AThousandShips AThousandShips modified the milestones: 4.2, 4.3 Nov 1, 2023
@akien-mga
akien-mga requested a review from Sauermann February 14, 2024 11:35

@Sauermann Sauermann left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread scene/main/window.cpp Outdated
@sepTN

sepTN commented Feb 18, 2024

Copy link
Copy Markdown
Contributor Author

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

@sepTN
sepTN force-pushed the add-screensize-check-popup branch from fff674f to 34210e8 Compare February 18, 2024 17:29
@akien-mga
akien-mga merged commit dfcecb7 into godotengine:master Feb 18, 2024
@akien-mga

Copy link
Copy Markdown
Member

Thanks!

@akien-mga akien-mga added cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release cherrypick:4.1 labels Apr 30, 2024
@akien-mga akien-mga removed the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Mar 19, 2025
BendyLand pushed a commit to BendyLand/voltaire that referenced this pull request Aug 2, 2026
…popup

Add size check to prevent popup bigger than the screen itself
BendyLand pushed a commit to BendyLand/voltaire that referenced this pull request Aug 2, 2026
…popup

Add size check to prevent popup bigger than the screen itself
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Project Settings freezes up Godot Engine

6 participants