Feature Request: Hide TkinterOS window elements when the desktop is not focused
Description
A clear and concise description of the desired feature/optimization.
- Current Pain Point: When switching to other fullscreen windows (e.g., fullscreen applications/games), multiple Toplevel windows opened in TkinterOS remain visible on the screen, disrupting the user experience of the active fullscreen application.
- Desired Outcome: Refactor all independent Toplevel windows into Frame widgets embedded within the main TkinterOS desktop window, with custom title bars for each Frame.
- Use Case: When the TkinterOS desktop window loses focus (is not the active window), all TkinterOS UI elements (including its "applications") should be completely hidden and not visible over other fullscreen windows.
Proposed Solution
Specific technical approaches and ideas for implementation:
- UI Architecture Refactor: Replace all always-on-top Toplevel windows with Frame widgets, each with a custom title bar (to mimic window controls like minimize/maximize/close).
- Window Embedding: Use the
ctypes.windll.user32.SetParent Windows API function to embed all previously independent Toplevel windows into the main TkinterOS desktop window, ensuring they are only visible when the main window is active.
- Focus Detection: Implement focus change detection for the main TkinterOS window – when it loses focus (e.g., user switches to another fullscreen app), hide the entire TkinterOS window/Frame container; when it regains focus, show it again.
Additional Context
Current Unwanted Behavior

Desired Behavior

Key Notes
- The core goal is to ensure TkinterOS does not "float" over other fullscreen applications when it is not the active/focused window.
- Maintaining the window management experience (minimize/maximize/close) within TkinterOS is still required after refactoring to Frames.
Feature Request: Hide TkinterOS window elements when the desktop is not focused
Description
A clear and concise description of the desired feature/optimization.
Proposed Solution
Specific technical approaches and ideas for implementation:
ctypes.windll.user32.SetParentWindows API function to embed all previously independent Toplevel windows into the main TkinterOS desktop window, ensuring they are only visible when the main window is active.Additional Context
Current Unwanted Behavior
Desired Behavior
Key Notes