On Friday 24 of June 2005 02:53, Carsten Haitzler wrote: ... > > personally i wish there were better ways to uniquely identify a particular > app consistently - netwm's pid property, name, class, title and maybe netwm > role combined make for quite a mess. i was thinking that in future maybe we > can have some registration system where app devs get a unique ID for their > app and can then use that. an md5sum of the binary would be nice but an > upgrade would break things - or a recompile. but for now let's assume md5 > sum of the binary - and we place this as a property on a window... now we > can be guaranteed to UNIQUELY identify THAT app. but we need something > better than an md5 of the binary for the ID. it'd also be nice if this can > be slid into xlib itself so that legacy apps suddenly "just work". any one > got ideas?
There is a way to identify a particular app and window from it uniquely. For app, just WM_CLASS, for a specific window WM_CLASS + WM_WINDOW_ROLE. The ICCCM is quite clear on these I think, and that's what KWin uses for identifying windows for its window-specific settings. Of course, a large number of apps get it wrong, either completely or just kind of wrong[*], and the first release of KWin with this feature didn't work that well because I had to add detection of the various ways of getting it wrong. [*] From my understanding of the relevant parts of ICCCM, app Foo should generally set its WM_CLASS to "foo", "foo" (resname, resclass), or for a specific instance it should be "<whatever>", "foo", where <whatever> is specified using -name. WM_WINDOW_ROLE should uniquely identify any window within a specific app instance. The most usual ways of not getting it quite right include adding version to resclass, using resname instead of WM_WINDOW_ROLE or simply setting some rubbish there (Mozilla,OOo). But that's a fault of the apps, not of the spec. -- Lubos Lunak KDE developer --------------------------------------------------------------------- SuSE CR, s.r.o. e-mail: [EMAIL PROTECTED] , [EMAIL PROTECTED] Drahobejlova 27 tel: +420 2 9654 2373 190 00 Praha 9 fax: +420 2 9654 2374 Czech Republic http://www.suse.cz/ _______________________________________________ wm-spec-list mailing list wm-spec-list@gnome.org http://mail.gnome.org/mailman/listinfo/wm-spec-list