[PATCH] New client/monitor attributes

Florian Bruhin me at the-compiler.org
Fri Oct 4 06:56:56 CEST 2013


Heya,

it's been a while, but I finally updated these patches :)
(yay, first real post in the new ml!)

* Thorsten Wißmann <edu at thorsten-wissmann.de> [2013-06-24 12:53:26 +0200]:
> On Thu, Jun 20, 2013 at 10:38:07PM +0200, Florian Bruhin wrote:
> > The pid attribute will be -1 if the client didn't set it, I'm not sure
> > if this is the best solution, or if I should handle this attribute as
> > a custom string instead, and return an empty string if there is no pid
> > set. Opinions?
> 
> I'd prefer the -1 option (and document it in the manpage)
> 
> You also could add some description of the attributes to the manpage
> (there's already a OBJECTS section[1] describing the attributes)

Done.

> >      HSAttribute attributes[] = {
> > +        ATTRIBUTE_STRING(   "tag",          client->tag->display_name, ATTR_READ_ONLY),
> 
> This looks wrong, because ATTRIBUTE_STRING remembers the address of the
> string you gave it. So in your case this attribute will always give the
> name of the tag the client initially was on (and it should crash as soon
> as the initial tag is removed). I recommend using a custom string
> attribute here. (ATTRIBUTE_STRING only works for strings whose address
> is constant during the livetime of the object or client in this case).

Also done, didn't know about that, seemed logical like I did it :)

I have to apologize about the quality of the previous patches, I was
sending out patches to the ML and was like "oh, that's also finished
and seems to work, let's send it out" without actually really testing
it :-/

Flo

-- 
() ascii ribbon campaign - stop html mail    www.asciiribbon.org
/\ www.the-compiler.org  | I love long mails http://email.is-not-s.ms/
May you die in bed at 95, shot by a jealous spouse. 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-some-new-client-attributes.patch
Type: text/x-diff
Size: 3349 bytes
Desc: not available
URL: <https://listi.jpberlin.de/pipermail/hlwm/attachments/20131004/f2227e36/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Add-tag-attribute-to-monitor-object.patch
Type: text/x-diff
Size: 1809 bytes
Desc: not available
URL: <https://listi.jpberlin.de/pipermail/hlwm/attachments/20131004/f2227e36/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <https://listi.jpberlin.de/pipermail/hlwm/attachments/20131004/f2227e36/attachment.sig>


More information about the hlwm mailing list