v1.8.36: fix fullscreen toggle — _is_detached flag prevents re-embed conflict

- Added _is_detached flag to EmbeddedRDP (set in detach(), cleared in reattach())
- _monitor_tick() skips try_reembed() when window is intentionally detached
- Prevents race condition: monitor tick no longer re-embeds fullscreen window
- Added plans/test-rdp.md — RDP testing documentation
- build.py auto-cleanup removed v1.8.31

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
chrome-storm-c442
2026-02-24 12:59:16 -05:00
parent 68f2d7eae8
commit 142b68515c
5 changed files with 459 additions and 2 deletions

View File

@@ -243,6 +243,7 @@ class EmbeddedRDP:
self._rdp_file: str | None = None
self._connected = False
self._parent_hwnd: int | None = None
self._is_detached = False # True when intentionally fullscreen
# Callbacks (set by GUI)
self.on_embedded = None # called when window is embedded
@@ -612,6 +613,7 @@ class EmbeddedRDP:
"""Detach mstsc from parent — for fullscreen."""
if not self._mstsc_hwnd or not self._connected:
return
self._is_detached = True
try:
import ctypes
import ctypes.wintypes
@@ -644,6 +646,7 @@ class EmbeddedRDP:
"""Re-embed mstsc back into the tkinter frame."""
if not self._mstsc_hwnd:
return
self._is_detached = False
self._embed(parent_hwnd, width, height)
log.info("mstsc reattached")