Skip to content

Commit

Permalink
#3537 clamp window models to the new screen size
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed May 7, 2022
1 parent 2805311 commit aecd8e2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions xpra/x11/server.py
Expand Up @@ -421,6 +421,14 @@ def get_window_info(self, window):
# Manage the virtual screen:
#
def set_screen_size(self, desired_w, desired_h, bigger=True):
#clamp all window models to the new screen size:
for window in tuple(self._window_to_id.keys()):
x, y, w, h = self._desktop_manager.window_geometry(window)
if x>=desired_w or y>=desired_h:
x = min(x, desired_w-10)
y = min(y, desired_h-10)
geomlog("clamped window %s", window)
self._desktop_manager.update_window_geometry(window, x, y, w, h)
with xlog:
d16 = X11RandR.is_dummy16()
screenlog("set_screen_size%s randr=%s, randr_exact_size=%s, is_dummy16()=%s",
Expand Down

0 comments on commit aecd8e2

Please sign in to comment.