[haiku-development] Re: Stack & Tile update

  • From: Stephan Assmus <superstippi@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 25 Jan 2009 13:31:55 +0100

On 2009-01-25 at 11:38:11 [+0100], Bruno Albuquerque <bga@xxxxxxxxxxxxx> 
wrote:
> On Sun, 25 Jan 2009 11:35:51, Bruno Albuquerque said:
> 
> > On Sun, 25 Jan 2009 23:30:39 +1300, Christof Lutteroth said:
> > 
> > > I would like to make the Stack & Tile configuration permanent, i.e. 
> > > 
> > > store it like the window positions. Could someone please indicate how 
> > and where data about windows are stored at the moment so that I can 
> > extend the existing mechanism?
> > 
> > Window position information is stored in an extended attributes 
> > attached to directories:
> 
> Ops, Sorry. This is only for Tracker windows and you want windows for 
> every application.

Yep. But for Tracker, decor settings are already stored in an attribute, 
though that is per window.

I just had another idea: Maybe app_server could create a unique ID for 
every window group it creates, and maintain the relevant additional group 
settings with some mechanism to automatically clean out old groups perhaps. 
In the existing mechanism to retrieve app_server window state info 
(BWindow::[Set|Get]DecoratorSettings()), the app_server window could store 
it's group unique id and perhaps some other info, like position in the 
stack etc.. Then when the window's settings are restored, it could try to 
attach itself to the group. If it does not exist yet, the app_server could 
recreate the group with the stored settings. When other windows are 
recreated, and the owning application(s) restore their setting with 
SetDecoratorSettings(), these windows could be dynamically added to the 
already existing group.

This approach has some potentially nice side effects, most importantly that 
you can close and reopen application windows which automatically join their 
previous window stack. The drawback of this approach is that every 
application needs to use the new Set/GetDecoratorSettings() window method 
and include the data in their persistency storage. Currently, only Tracker 
does this. Could be kind of neat though.

Best regards,
-Stephan

Other related posts: