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

Add setClientMessageEvent' #71

Merged
merged 1 commit into from
Mar 31, 2021
Merged

Add setClientMessageEvent' #71

merged 1 commit into from
Mar 31, 2021

Conversation

liskin
Copy link
Member

@liskin liskin commented Nov 6, 2020

The existing setClientMessageEvent can't be used to send EWMH
_NET_WM_STATE client messages as they need more than 2 items in data.
Furthermore, it doesn't set all of data and thus sends whatever was in
memory before.

The motivation here is that we want xmonad to be configurable to ignore some _NET_ACTIVE_WINDOW requests to prevent e.g. browsers from stealing focus, but it's nice to make that focus request visible somehow. And since the urgency handling machinery is already very configurable in xmonad, the easiest way to plug into it is to send a message to ourselves.

A draft of that is here: liskin/xmonad-contrib@7bac095
Usage example: liskin/dotfiles@18dfd71#diff-f3bd9f70ef878f30362ff11bbea7fd1d0d6abde1b4befa44b18cce5a27456204R257

Related discussions:
xmonad/xmonad-contrib#109 (comment)
xmonad/xmonad-contrib#110 (comment)
xmonad/xmonad-contrib#396
xmonad/xmonad-contrib#399

@geekosaur
Copy link
Contributor

geekosaur commented Nov 6, 2020 via email

@liskin
Copy link
Member Author

liskin commented Nov 6, 2020

Is "sends whatever was in memory before" the security hole it sounds like?

Not really. You'd need to have xmonad handling sensitive data (somewhat unlikely) and you'd need a way to make xmonad send a ClientMessage on demand and observe that message, but you'd also need to not have the ability to control the X server in other ways, which you almost always do. Why would you extract information using a few leaked bytes in ClientMessages when you can just XTEST a keybinding to launch the terminal and then do whatever you want?

liskin added a commit to liskin/xmonad-contrib that referenced this pull request Nov 15, 2020
These are useful when one blocks some _NET_ACTIVE_WINDOW requests but
still wants to somehow show that a window requested focus.

TODO: changelog
TODO: xmonad/X11#71
TODO: maybe bump X11 dependency instead?
liskin added a commit to liskin/xmonad-contrib that referenced this pull request Nov 15, 2020
These are useful when one blocks some _NET_ACTIVE_WINDOW requests but
still wants to somehow show that a window requested focus.

TODO: changelog
TODO: xmonad/X11#71
TODO: maybe bump X11 dependency instead?
liskin added a commit to liskin/xmonad-contrib that referenced this pull request Nov 16, 2020
These are useful when one blocks some _NET_ACTIVE_WINDOW requests but
still wants to somehow show that a window requested focus.

TODO: changelog
TODO: xmonad/X11#71
TODO: maybe bump X11 dependency instead?
@liskin liskin mentioned this pull request Jan 15, 2021
16 tasks
liskin added a commit to liskin/xmonad-contrib that referenced this pull request Jan 25, 2021
These are useful when one blocks some _NET_ACTIVE_WINDOW requests but
still wants to somehow show that a window requested focus.

TODO: changelog
TODO: xmonad/X11#71
TODO: maybe bump X11 dependency instead?
liskin added a commit to liskin/xmonad-contrib that referenced this pull request Jan 30, 2021
These are useful when one blocks some _NET_ACTIVE_WINDOW requests but
still wants to somehow show that a window requested focus.

TODO: changelog
TODO: xmonad/X11#71
TODO: maybe bump X11 dependency instead?
liskin added a commit to liskin/xmonad-contrib that referenced this pull request Feb 7, 2021
These are useful when one blocks some _NET_ACTIVE_WINDOW requests but
still wants to somehow show that a window requested focus.

TODO: changelog
TODO: xmonad/X11#71
TODO: maybe bump X11 dependency instead?
@liskin
Copy link
Member Author

liskin commented Feb 14, 2021

I'd like to merge this and #72 in a few days. Can we then make a 0.10 release so that this stuff can be used in xmonad and xmonad-contrib?

Unfortunately it seems the list of people who can actually upload the release and are active is quite small: https://hackage.haskell.org/package/X11/maintainers/
Would it perhaps make sense to add a few more of the active xmonad core folks to that list? (And to https://hackage.haskell.org/package/xmonad/maintainers/ and https://hackage.haskell.org/package/xmonad-contrib/maintainers/)

@liskin
Copy link
Member Author

liskin commented Feb 14, 2021

Oh and #42 can probably be merged as well after all these years. I can help with that, but I'd like to see a confirmation that the work won't be wasted first.

@dmwit
Copy link
Contributor

dmwit commented Feb 14, 2021

Make your request more concrete, please: which Hackage users are you asking to be added to the maintainers list?

@liskin
Copy link
Member Author

liskin commented Feb 14, 2021

@dmwit geekosaur doesn't have a hackage account, so from the active core team maintainers, https://hackage.haskell.org/user/psibi and https://hackage.haskell.org/user/TomasJanousek (myself) are good candidates to add.

liskin added a commit to liskin/xmonad-contrib that referenced this pull request Mar 23, 2021
These are useful when one blocks some _NET_ACTIVE_WINDOW requests but
still wants to somehow show that a window requested focus.

TODO: changelog
TODO: xmonad/X11#71
TODO: maybe bump X11 dependency instead?
@liskin liskin added this to the v0.10 milestone Mar 27, 2021
The existing setClientMessageEvent can't be used to send EWMH
_NET_WM_STATE client messages as they need more than 2 items in data.
Furthermore, it doesn't set all of data and thus sends whatever was in
memory before.
@liskin liskin merged commit a412e29 into xmonad:master Mar 31, 2021
@liskin liskin deleted the clientmessage branch March 31, 2021 14:52
TheMC47 pushed a commit to TheMC47/xmonad-contrib that referenced this pull request Apr 7, 2021
These are useful when one blocks some _NET_ACTIVE_WINDOW requests but
still wants to somehow show that a window requested focus.

TODO: changelog
TODO: xmonad/X11#71
TODO: maybe bump X11 dependency instead?
TheMC47 pushed a commit to TheMC47/xmonad-contrib that referenced this pull request Apr 13, 2021
These are useful when one blocks some _NET_ACTIVE_WINDOW requests but
still wants to somehow show that a window requested focus.

TODO: changelog
TODO: xmonad/X11#71
TODO: maybe bump X11 dependency instead?
TheMC47 pushed a commit to TheMC47/xmonad-contrib that referenced this pull request May 21, 2021
These are useful when one blocks some _NET_ACTIVE_WINDOW requests but
still wants to somehow show that a window requested focus.

TODO: changelog
TODO: xmonad/X11#71
TODO: maybe bump X11 dependency instead?
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.

3 participants