Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Active vs. focused windows #177

Open
bbidulock opened this issue Oct 10, 2017 · 3 comments
Open

Active vs. focused windows #177

bbidulock opened this issue Oct 10, 2017 · 3 comments
Labels
enhancement The report requests an enhancement beyond the intended behaviour.
Milestone

Comments

@bbidulock
Copy link
Owner

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.

@bbidulock bbidulock added the enhancement The report requests an enhancement beyond the intended behaviour. label Oct 16, 2017
@gam3
Copy link
Contributor

gam3 commented Mar 12, 2018

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?

@bbidulock
Copy link
Owner Author

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.

@bbidulock bbidulock added this to the 1.4.3 milestone Jun 5, 2018
@gam3
Copy link
Contributor

gam3 commented Aug 30, 2018

_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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The report requests an enhancement beyond the intended behaviour.
Projects
None yet
Development

No branches or pull requests

2 participants