OpenRoadCode
Public API reference for OpenRoadCode
Loading...
Searching...
No Matches
apps.launchers.external_window_manager.ExternalWindowManager Class Reference

Find, position, activate, hide, show, and close external X11 windows by class. More...

Public Member Functions

str|None fit (self, *str display, str window_class, tuple[int, int] position, tuple[int, int] size)
 Fit a matching undecorated window to the requested rectangle.
 
str|None activate (self, *str display, str window_class)
 Raise and focus a matching external window.
 
bool hide (self, *str display, str|None window_id)
 Hide an identified external window without terminating its process.
 
bool show (self, *str display, str|None window_id)
 Restore an identified external window without changing process state.
 
bool close (self, *str display, str|None window_id)
 Ask the window manager to close an identified external window.
 
str|None wait_for_window_id (self, *str display, str window_class)
 Wait briefly for a window whose WM_CLASS contains window_class.
 

Detailed Description

Find, position, activate, hide, show, and close external X11 windows by class.

Member Function Documentation

◆ hide()

bool apps.launchers.external_window_manager.ExternalWindowManager.hide (   self,
*str  display,
str | None  window_id 
)

Hide an identified external window without terminating its process.

Window managers do not all treat xdotool windowminimize identically. Request the EWMH hidden state as well so helper browser windows reliably disappear under XFCE and other lightweight X11 desktops.

◆ wait_for_window_id()

str | None apps.launchers.external_window_manager.ExternalWindowManager.wait_for_window_id (   self,
*str  display,
str  window_class 
)

Wait briefly for a window whose WM_CLASS contains window_class.

wmctrl -lx is the normal fast path. Some Termux X11/XFCE Chromium windows appear in _NET_CLIENT_LIST but are omitted from that output, so fall back to querying each root client with xprop.


The documentation for this class was generated from the following file: