Open bbidulock opened 7 years ago
I think by definition the _NET_ACTIVE_WINDOW is the window with state _NET_WM_STATE_FOCUSED.
watch 'xprop -id $(xprop -root _NET_ACTIVE_WINDOW | awk -e "{ print \$5 }") _NET_WM_STATE WM_NAME'
Am I missing the point of this issue?
Not all windows can be focused (some do not allow input); however, any window can be active. So at a given point in time it is possible to have one window focused and another active.
_NET_ACTIVE_WINDOW The window ID of the currently active window or None if no window has the focus. https://standards.freedesktop.org/wm-spec/wm-spec-latest.html#idm140200472702304
_NET_WM_STATE_FOCUSED indicates whether the window's decorations are drawn in an active state. Clients MUST regard it as a read-only hint. It cannot be set at map time or changed via a _NET_WM_STATE client message. The window given by _NET_ACTIVE_WINDOW will usually have this hint, but at times other windows may as well, if they have a strong association with the active window and will be considered as a unit with it by the user. Clients that modify the appearance of internal elements when a toplevel has keyboard focus SHOULD check for the availability of this state in _NET_SUPPORTED and, if it is available, use it in preference to tracking focus via FocusIn events. By doing so they will match the window decorations and accurately reflect the intentions of the Window Manager. https://standards.freedesktop.org/wm-spec/wm-spec-latest.html#idm140200472615568
Under NetWM/EWMH active windows (those whose window is set in _NET_ACTIVE_WINDOW) and focused windows (those with _NET_WM_STATE_FOCUSED set in _NET_WM_STATE) must always be the same. These are different concepts. Window can be active without having focus. IceWM needs to track active and focused windows separately.