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

guess initial server display resolution #4302

Closed
totaam opened this issue Jul 19, 2024 · 1 comment
Closed

guess initial server display resolution #4302

totaam opened this issue Jul 19, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@totaam
Copy link
Collaborator

totaam commented Jul 19, 2024

At the moment, we just hardcode some sensible defaults:

def parse_env_resolutions(envkey="XPRA_DEFAULT_VFB_RESOLUTIONS",
single_envkey="XPRA_DEFAULT_VFB_RESOLUTION",
default_res="8192x4096",
default_refresh_rate=DEFAULT_REFRESH_RATE//1000):
s = os.environ.get(envkey)
if s:
return parse_resolutions(s, default_refresh_rate)
return (parse_resolution(os.environ.get(single_envkey, default_res), default_refresh_rate), )
def get_desktop_vfb_resolutions(default_refresh_rate=DEFAULT_REFRESH_RATE//1000):
return parse_env_resolutions("XPRA_DEFAULT_DESKTOP_VFB_RESOLUTIONS",
"XPRA_DEFAULT_DESKTOP_VFB_RESOLUTION",
"1280x1024",
default_refresh_rate=default_refresh_rate)

And if we're going to attach locally, we take a shortcut and set the resolution to match that of the current desktop session:
acd37f3

But we could also use the current resolution every time a session is started from an existing desktop session, because chances are that the user will connect locally, and if not this guess is as good as any.

@totaam totaam added the enhancement New feature or request label Jul 19, 2024
@totaam
Copy link
Collaborator Author

totaam commented Jul 19, 2024

Done in fe1b17c

@totaam totaam closed this as completed Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant