Skip to content

Commit

Permalink
make the default iconify delay configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Dec 14, 2023
1 parent 824d488 commit a9441fb
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions xpra/client/gtk3/gtk_client_window_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ def can_set_workspace():
REFRESH_MAXIMIZED = envbool("XPRA_REFRESH_MAXIMIZED", True)
UNICODE_KEYNAMES = envbool("XPRA_UNICODE_KEYNAMES", False)
SMOOTH_SCROLL = envbool("XPRA_SMOOTH_SCROLL", True)
ICONIFY_LATENCY = envint("XPRA_ICONIFY_LATENCY", 150)

WINDOW_OVERFLOW_TOP = envbool("XPRA_WINDOW_OVERFLOW_TOP", False)
AWT_RECENTER = envbool("XPRA_AWT_RECENTER", True)
Expand Down Expand Up @@ -1064,12 +1065,13 @@ def schedule_send_iconify(self) -> None:
#calculate a good delay to prevent races causing minimize/unminimize loops:
if self._client.readonly:
return
delay = 150
spl = tuple(self._client.server_ping_latency)
if spl:
worst = max(x[1] for x in self._client.server_ping_latency)
delay += int(1000*worst)
delay = min(1000, delay)
delay = ICONIFY_LATENCY
if delay>0:
spl = tuple(self._client.server_ping_latency)
if spl:
worst = max(x[1] for x in self._client.server_ping_latency)
delay += int(1000*worst)
delay = min(1000, delay)
statelog("telling server about iconification with %sms delay", delay)
self.send_iconify_timer = self.timeout_add(delay, self.send_iconify)

Expand Down

0 comments on commit a9441fb

Please sign in to comment.