diff --git a/src/xpra/client/client_window_base.py b/src/xpra/client/client_window_base.py index ce560dca3e..d695ba3b3a 100644 --- a/src/xpra/client/client_window_base.py +++ b/src/xpra/client/client_window_base.py @@ -187,12 +187,23 @@ def is_OR(self): def update_metadata(self, metadata): metalog("update_metadata(%s)", metadata) + if self._client.readonly: + metadata.update(self._force_size_constraint(*self._size)) self._metadata.update(metadata) try: self.set_metadata(metadata) except Exception: metalog.warn("failed to set window metadata to '%s'", metadata, exc_info=True) + def _force_size_constraint(self, *size): + return { + b"size-constraints" : { + b"maximum-size" : size, + b"minimum-size" : size, + b"base-size" : size, + } + } + def set_metadata(self, metadata): metalog("set_metadata(%s)", metadata) debug_props = [x for x in PROPERTIES_DEBUG if x in metadata.keys()] diff --git a/src/xpra/client/gl/window_backend.py b/src/xpra/client/gl/window_backend.py index abe68392ca..1649a1f34e 100755 --- a/src/xpra/client/gl/window_backend.py +++ b/src/xpra/client/gl/window_backend.py @@ -79,6 +79,7 @@ def noop(*_args): noclient.server_window_decorations = True noclient.mmap_enabled = False noclient.mmap = None + noclient.readonly = False noclient.encoding_defaults = {} noclient.get_window_frame_sizes = get_None noclient._set_window_menu = None diff --git a/src/xpra/client/gtk_base/gtk_client_window_base.py b/src/xpra/client/gtk_base/gtk_client_window_base.py index 6f27115b3c..f98841a378 100644 --- a/src/xpra/client/gtk_base/gtk_client_window_base.py +++ b/src/xpra/client/gtk_base/gtk_client_window_base.py @@ -1499,6 +1499,12 @@ def do_moveresize(self): x, y = int(move[0]), int(move[1]) if resize: w, h = int(resize[0]), int(resize[1]) + if self._client.readonly: + #change size-constraints first, + #so the resize can be honoured: + sc = self._force_size_constraint(w, h) + self._metadata.update(sc) + self.set_metadata(sc) if move and resize: self.get_window().move_resize(x, y, w, h) elif move: