From ace35780a1ec728a62affd1480f135a0445259a5 Mon Sep 17 00:00:00 2001 From: aliriza Date: Thu, 23 Nov 2023 13:26:35 +0000 Subject: [PATCH] fix single monitor --- src/module/screen.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/module/screen.py b/src/module/screen.py index 24bc738..3ac9646 100644 --- a/src/module/screen.py +++ b/src/module/screen.py @@ -11,11 +11,14 @@ def _update_resolution_event(flag=None): w = int(resolution.split("x")[0]) h = int(resolution.split("x")[1]) update_window_resolution(w, h) + set_window_monitor(0) return if get("mirror", True, "screen") and not is_virtual_machine(): monitor.mirror() else: i = int(float(get("default-monitor", "0", "screen"))) + if len(monitor.get_monitors()) < i: + i = len(monitor.get_monitors()) -1 monitor.init_monitor() set_window_monitor(i)