Re: How to put windows into groups by application type.

Eric A <[email protected]>
Newsgroups gmane.comp.window-managers.ratpoison.devel
Message-ID <[email protected]>
On Sun, Mar 14, 2010 at 5:09 AM, tomm smith <[email protected]> wrote:
> I believe I have created a patch for this desired hook. Only had to
> change a few lines, basically define the hook and add a hook call to
> new_window(). I am a newborn in the C world so if any of this is
> hackery that does not comply with GNU coding standards I do apologize.
> I have attached the patch to this email. I tested out the code very
> shortly I plan to test it more, but initial test showed everything was
> working smoothly.
>

Thanks, I think this is what I'm looking for! I tried it out, but ran
into a problem. It seems that for most programs,
new_window(XCreateWindowEvent *e) is called multiple times. For
example, starting midori issues 2 events and firefox 3 events. In
fact, the only program that I've tested that calls it just once is
urxvt.

I tried filtering out the multiple events by looking at the window
properties. It seems that all the additional events have window
height/widths (e->height and e->width) of 1, 2, or 10. So by filtering
all windows with height/widths of <=10, I was able to produce only one
event per "real window".

I'm not sure whether this would work 100% of the time though. Do you
have any better ideas?

Thanks,
Eric
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.