Skip to content

Conversation

@TheMC47
Copy link
Member

@TheMC47 TheMC47 commented Jan 4, 2026

Description

Add support for NET_WM_STATE{ABOVE,BELOW}. This includes both a manage hook to handle states that are put at the start and an event handler for ClientMessageEvent.

I am not sure where to exactly hook into the hooks (not particularly proud with how I added the handle event hook), so ideas are welcome. Maybe I could do a small refactoring for the module first? Not sure

Checklist

  • I've read CONTRIBUTING.md

  • I've considered how to best test these changes (property, unit,
    manually, ...) and concluded: Wrote a small python script that would switch between the states (using add, remove, and toggle) and observed the _NET_WM_STATE with xprop -spy and how the window behaved

Add ABOVE - should go above other windows
Remove ABOVE - should not change
Add ABOVE again - should stay above other windows
Add BELOW - should go below other windows
Remove BELOW - should not change
Toggle ABOVE - should add ABOVE
Toggle ABOVE - should remove ABOVE
Toggle BELOW - should add BELOW
Toggle BELOW - should remove BELOW
Add ABOVE again - should go above other windows
Toggle BELOW - should add BELOW and remove ABOVE
Toggle ABOVE - should add ABOVE and remove BELOW
  • I updated the CHANGES.md file

Add support for _NET_WM_STATE_{ABOVE,BELOW}. This includes both a manage
hook to handle states that are put at the start and an event handler for
ClientMessageEvent.
Copy link
Contributor

@geekosaur geekosaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

…once the typo is fixed 😀

@slotThe slotThe merged commit 4da00d2 into xmonad:master Jan 6, 2026
20 checks passed
@liskin
Copy link
Member

liskin commented Jan 6, 2026

How does this interact with xmonad setting the window order in X.O.windows?

@liskin
Copy link
Member

liskin commented Jan 6, 2026

How does this interact with xmonad setting the window order in X.O.windows?

Seems to me this only works meaningfully for unmanaged windows... If so, that seems like a rather big caveat that's worth spelling out somewhere.

@TheMC47
Copy link
Member Author

TheMC47 commented Jan 6, 2026

It works for managed windows too. The state is not forced, so as soon as the user interacts with the window (changes focus, for example) the stacking order changes. As I understood the spec, that's expected

@TheMC47 TheMC47 deleted the ewmh-handle-above-below branch January 6, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants