# Phase 7 — EWMH Basics --- ## Step 7.1 — Set root window EWMH properties At startup, set on the root window: - `_NET_SUPPORTED` — list of atoms we support. - `_NET_SUPPORTING_WM_CHECK` — create a child window, set `_NET_WM_NAME` on it to `"winman-raylib"`. - `_NET_CLIENT_LIST` — list of managed windows. - `_NET_ACTIVE_WINDOW` — currently focused window. - `_NET_NUMBER_OF_DESKTOPS` — `1` (for now). - `_NET_CURRENT_DESKTOP` — `0`. Update `_NET_CLIENT_LIST` and `_NET_ACTIVE_WINDOW` as windows are added/removed/focused. **Verify:** `DISPLAY=:1 wmctrl -m` shows the WM name. `wmctrl -l` lists managed windows. `xprop -root _NET_SUPPORTED` shows the atom list. --- ## Step 7.2 — Handle _NET_WM_WINDOW_TYPE Read `_NET_WM_WINDOW_TYPE` from each window on map. Handle at minimum: - `_NET_WM_WINDOW_TYPE_NORMAL` — standard management. - `_NET_WM_WINDOW_TYPE_DIALOG` — don't decorate differently (for now), but keep above parent if `WM_TRANSIENT_FOR` is set. - `_NET_WM_WINDOW_TYPE_DOCK` — don't manage (panels); reserve screen space per `_NET_WM_STRUT` / `_NET_WM_STRUT_PARTIAL`. **Verify:** A dock-type window (e.g., `DISPLAY=:1 tint2` or a custom test client) is not given a title bar and stays above other windows. --- ## Step 7.3 — Handle _NET_WM_STATE (fullscreen) Listen for `_NET_WM_STATE` `ClientMessage` requests. Implement at minimum: - `_NET_WM_STATE_FULLSCREEN` — resize window to fill screen, remove decorations, draw above all others. **Verify:** `DISPLAY=:1 wmctrl -r :ACTIVE: -b toggle,fullscreen` toggles the focused window to fullscreen and back.