Skip to content

Commit

Permalink
#4384 tell the screen model if it can be resized
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Jan 5, 2025
1 parent 075fa50 commit e32f79d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions xpra/x11/desktop/desktop_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ class ScreenDesktopModel(DesktopModelBase):
_property_names = DesktopModelBase._property_names + ["xid"]
_dynamic_property_names = ["size-hints", "title", "icons"]

def __init__(self, resize_exact=False):
def __init__(self, resize=True, resize_exact=False):
super().__init__()
self.can_resize = resize
self.resize_exact = resize_exact

def __repr__(self):
Expand Down Expand Up @@ -145,7 +146,7 @@ def use_fixed_size() -> None:
"base-size": size,
})

if RandR.has_randr():
if self.can_resize:
if self.resize_exact:
# assume resize_exact is enabled
# no size restrictions
Expand Down
2 changes: 1 addition & 1 deletion xpra/x11/desktop/desktop_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def make_hello(self, source) -> dict[str, Any]:

def load_existing_windows(self) -> None:
with xsync:
model = ScreenDesktopModel(self.randr_exact_size)
model = ScreenDesktopModel(self.randr, self.randr_exact_size)
model.setup()
screenlog("adding root window model %s", model)
super().do_add_new_window_common(1, model)
Expand Down

0 comments on commit e32f79d

Please sign in to comment.