fix: UART window stability on Windows — lift/focus, remove stray grab_release

CTkToplevel on Windows can fail to display (flash then disappear)
without explicit lift()/focus(). Also removed grab_release() call
in _on_close since grab_set() was never called — calling release
without a matching grab can cause issues on some Windows tkinter
builds.
This commit is contained in:
2026-06-11 18:24:42 +08:00
parent 906f787748
commit 4ef1ce0c6b
+2 -1
View File
@@ -953,6 +953,8 @@ class UartMonitorWindow(ctk.CTkToplevel):
self.geometry("680x540")
self.minsize(480, 360)
self.protocol("WM_DELETE_WINDOW", self._on_close)
self.lift() # ensure visible on Windows
self.focus()
self._on_log = on_log
@@ -1201,5 +1203,4 @@ class UartMonitorWindow(ctk.CTkToplevel):
if self._monitor:
self._monitor.stop()
self._monitor = None
self.grab_release()
self.destroy()