Re: Gnome session mgmt vs WindowMaker-gnome session mgmt (Debian Potato)



>> As I understand it, all the Window Manager has to go on when is restoring
>> windows is the title of the window, and its class.  So what happens if,
>> for example, I make a session aware app that has multiple instances open
>> on different workspaces, but with identical titles?  How does the Window
>> Manager know which one to put where?  I am not being difficult - I would
>> honestly like to know how I am supposed to code this.
>
>I think each window has a name and a title, the title is displayed, but the na
>me hidden, containing maybe more data. Take a look at Eterm + irc themes for e
>xample, the title changes for different irc servers but the window manager kno
>ws to handle it the same each time. (probably a bad example)

Yup, this is the idea - the application can set the class, name and role of 
each window to uniquely identify them. The original use for these properties 
was to allow the application to be looked up in the X resources database. 
Unfortunately Gnome apps don't make use of the XRDB, so these properties are 
unlikely to be set... which leaves us with the window title. If the 
application implements session management perfectly, this will be the same 
for each top-level window after a restart as it was before the last logout. 
Unfortunately, few applications currently do anything useful with session 
management, and if they are restarted by the session manager it's probably 
in a "default" state, with the window title different from what it was set
to at logout.

Basically, we can implement session management in the window manager using
window name, class, role and title to identify windows, but it will only
work when applications set those hints correctly. I'm sure that will happen
once there's a window manager which uses the hints.


Michael Rogers



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]