On 4/10/06, Etan Reisner <deryni@eden.rutgers.edu> wrote:
On Thu, 6 Apr 2006, Mike Sartain wrote:
> Just out of curiosity, what changes do you think gaim would need?

You tell me? Can you currently keep track of every window that you would
need/want to? Can you do it easily and cleanly? Can you get notified of
new windows early enough to move them usefully?

I just wasn't sure if you'd looked over the problem already and had something specific in mind. But if you're asking me, I'd say it depends on the feature set you want. First off, I'm assuming this will be a Windows only extension since, from what I can tell, other platforms handle this already. If that's true and you want the very basic solution which uses just the window titles to store the window position & dimensions, then everything is set - the current Window hook apis appear to work quite well in a fairly small amount of code.

If you want to use the gtk window role & title as the key (a class/title type thing which I'm currently doing to avoid potential conflicts) or you want any of those extra current extpos features (which should probably stay as a 3rd party plugin feature), then yes, it might be nice if we didn't have to enumerate all the top level gtk windows comparing native handles to find the GtkWindow information.

If you'd like to extend the current extension api to not require Window apis or to run this on other platforms, then callbacks for whenever GtkWindows are created and/or moved would be necessary.

Another possible feature which would eliminate the amount of preference writing would be to guarantee that the extension is unloaded after all other windows are destroyed. Then we could have a Window create / destroy hook and only update the data at those times vs every window move. I personally don't think this is a great idea even if doable because it also means a crash would lose any changes users made since startup.

The other question I was wondering about is how this should behave on a usb key. Is a simple check making sure the window isn't off the screen(s) on the new computer and scooting it into place on startup ok? Or would it be nice to have an option to store this data locally on the machine and not in the Gaim prefs file?