Fix jerky behavior when live resizing an OS window on platforms that report live resize being and end events

Also disable live resize begin/end events on Wayland since they are not
reliable.

On platforms that support live resize begin/end use a separately
configurable pause time before the screen is redrawn.

Fixes #6341
This commit is contained in:
Kovid Goyal
2023-06-07 14:31:39 +05:30
parent af389d6860
commit 89875af5e6
9 changed files with 54 additions and 19 deletions

View File

@@ -604,6 +604,13 @@ def resize_draw_strategy(x: str) -> int:
return cmap.get(x.lower(), 0)
def resize_debounce_time(x: str) -> Tuple[float, float]:
parts = x.split(maxsplit=1)
if len(parts) == 1:
return positive_float(parts[0]), 0.5
return positive_float(parts[0]), positive_float(parts[1])
def visual_window_select_characters(x: str) -> str:
import string
valid_characters = string.digits + string.ascii_uppercase