Skip to content

Commit

Permalink
#4384 don't set default resolution here
Browse files Browse the repository at this point in the history
only set the initial resolution if one was specified,
and check the randr capability instead of the randr flag because the flag can be set to False to prevent resizing, even though randr is actually available
  • Loading branch information
totaam committed Jan 5, 2025
1 parent dd0a1c4 commit 075fa50
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions xpra/x11/desktop/desktop_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ def __init__(self):

def server_init(self) -> None:
super().server_init()
from xpra.x11.vfb_util import set_initial_resolution, get_desktop_vfb_resolutions
from xpra.x11.vfb_util import set_initial_resolution
screenlog(f"server_init() randr={self.randr}, initial-resolutions={self.initial_resolutions}")
if not features.display:
if not RandR.has_randr() or not self.initial_resolutions or not features.display:
return
res = self.initial_resolutions or get_desktop_vfb_resolutions(default_refresh_rate=self.refresh_rate)
res = self.initial_resolutions
if len(res) > 1:
log.warn(f"Warning: cannot set desktop resolution to {res}")
log.warn(" multi monitor mode is not enabled")
Expand Down
6 changes: 4 additions & 2 deletions xpra/x11/desktop/monitor_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@ def __init__(self):

def server_init(self) -> None:
super().server_init()
from xpra.x11.vfb_util import set_initial_resolution, get_desktop_vfb_resolutions
from xpra.x11.vfb_util import set_initial_resolution
screenlog(f"server_init() randr={self.randr}, initial-resolutions={self.initial_resolutions}")
res = self.initial_resolutions or get_desktop_vfb_resolutions(default_refresh_rate=self.refresh_rate)
if not RandR.has_randr() or not self.initial_resolutions:
return
res = self.initial_resolutions
with xlog:
set_initial_resolution(res, self.dpi or self.default_dpi)

Expand Down

0 comments on commit 075fa50

Please sign in to comment.