Skip to content

Fix Multi Screen Bug #1189

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

Merged

Conversation

dev-joaovitor
Copy link
Contributor

@dev-joaovitor dev-joaovitor commented Feb 28, 2025

fixes #1188

# Restore the window configuration if the screen in cache is not available
if (DisplayServer.get_screen_count()
< (Global.config_cache.get_value("window", "screen") + 1)):
return
Copy link
Member

Choose a reason for hiding this comment

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

Not too sure about the return here, that will prevent the rest of the method code from executing. I think a better solution may be doing this:

var screen = Global.config_cache.get_value("window", "screen")
if DisplayServer.get_screen_count() >= screen + 1:
	get_window().current_screen = screen

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My first attempt was this one, but if the external monitor resolution is different than the current, the position may be a problem too.

In my case even if the screen was correct, the laptop resolution differ from the external one, that's why i've chosen to not apply any of the cache values

Copy link
Member

@OverloadedOrama OverloadedOrama left a comment

Choose a reason for hiding this comment

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

Thank you!

@OverloadedOrama OverloadedOrama merged commit 6b6c45a into Orama-Interactive:master Mar 11, 2025
4 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.

Multi screen: The program will crash on splash screen outside of the current screen if the previously cached screen aren't available
2 participants