Re: [dev] Fwd: [Patch] DWM: Add support for _NET_WM_DEMANDS_ATTENTION

From: Uli Schlachter <psychon_AT_znc.in>
Date: Sun, 20 Jun 2010 09:15:07 +0200

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Am 20.06.2010 00:19, Kris Maglione wrote:
> On Sat, Jun 19, 2010 at 11:42:15PM +0200, Uli Schlachter wrote:
>> a friend made me write the attached patch. It adds support for EWMH's
>> _NET_WM_DEMANDS_ATTENTION status by transfering it into ICCCM's urgency hint.
>>
>> I hope this is useful for others and perhaps this might even get included in the
>> main repository. I know this is not perfect, but the code for _NET_WM_FULLSCREEN
>> wasn't much worse than this. ;)
>
> Why not just set c->isurgent rather than actually changing the
> wmhints? Apart from being needlessly complicated and probably
> pointless, it's directly contrary to ICCCM 4.1.2. The window
> manager isn't allowed to change client properties.

I went for the easy route with this one. I knew that changing the hints will be
handled properly and thus it looked like the easier thing to do.

If I just set c->isurgent here, the next call to updatewmhints() might clear
that flag again (which btw also calls XSetWMHints(). Isn't that wrong, too?).

Anyway, attached is a new version of the patch. This one is now untested, sorry.
Technically, it would also have to set NetWMState, but then the state of
NetWMFullscreen would have to be remembered, so that that one can be set, too.

Cheers,
Uli
- --
- - Buck, when, exactly, did you lose your mind?
- - Three months ago. I woke up one morning married to a pineapple.
  An ugly pineapple... But I loved her!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBCAAGBQJMHb/3AAoJECLkKOvLj8sGgK0IAJABHfVdRKvIJbow0kZ07f+r
g8WXSN1DiS1jKw/pXGu7cE8cPbQB+SP9cHhigV2QqiA4MoDlq1IfPaqbrkv+L2cY
Mo6vN7o4oQj4TVMJmzou7f5CHnQ2BmUQH3JRk/cp27IDq+qxwJEgJeyvVsjJ6DGw
myvNNyFZepqV/1BLkf0eOfyeI9KSHjlSQFaGHLzAAsqouH8yvITXXJ70V7wGjqd5
ATInc0ejPrgRp/ldQdRUm5r7UWcM8Xhr4Agd+4pTtrXE1qipTYjPqRc1gHx+qi+L
ulCa0NXz28+CWx5Zho8wFas3shc85dXEpzjvfgIz2u1OtoMKOjRtNpHAQl/6wz4=
=Yehk
-----END PGP SIGNATURE-----

Received on Sun Jun 20 2010 - 07:15:07 UTC

This archive was generated by hypermail 2.2.0 : Sun Jun 20 2010 - 07:24:02 UTC