On Thu, Sep 16, 2010 at 02:40:58PM -0500, Claude Rubinson wrote:
> On Thu, Sep 16, 2010 at 07:03:26PM +0100, Thomas Adam wrote:
> > > Occasionally, however, I'll run into a site where there's no stable
> > > name. For example, the online music streaming site MOG.com only
> > > includes the name of the artist and song in the window name. Many X
> > > clients let you specify your own name, but neither Firefox nor Chrome
> > > does. Is there a way to uniquely identify such browser windows
> >
> > Nope -- not unless there's an additional property of the window that's
> > set (see xprop).
>
> That's what I figured. Thanks.
This is why looking for the class of the window and the resource won't help
you as these are static anyway -- and for the class property, this is only
ever allowed to be changed when the window is in the Withdrawn state,
anyway. With firefox, they're never any different from one another, so you
can't reliably use them to uniquely identify one firefox instance from
another.
This question has come up a lot in the past -- my preferred solution
(until/if (yeah, right) things change upstream so that Mozilla allow for
some identifier as part of the WM_NAME (for instance)) is to use
IndexedWindowName, and hope for the best. It makes for some ugly style
matching, but there's ways round that if you really care.
-- Thomas Adam
--
"Deep in my heart I wish I was wrong. But deep in my heart I know I am
not." -- Morrissey ("Girl Least Likely To" -- off of Viva Hate.)