bug 2549 (win32 windows initial state)


Subject: bug 2549 (win32 windows initial state)
From: Kenneth J.Davis (jeremyd@computer.org)
Date: Wed Jan 16 2002 - 14:32:42 CST


Attached is a patch that will allow all windows besides the
1st created one to use the stored size (width & height).

This is a continuation of the original patch I posted a
couple of months ago that I never got around to working on again.

This does not effect the code that will place the 1st opened
window at the position & with the size stored in the preference
file. At the time I implemented this part, I originally
made all windows use these values, but the overlapping nature
was wanted and so I modified it to only set the 1st window and
let Windows decide where to place & what size subsequent
windows will be. The attached patch uses the size stored
(via get/set Geometry(...)) when creating windows, but still
allows Windows to place them. This more or less allows the
overlapping nature of new windows to occur (Windows will still
occasionally place a new window in the same position as the
previous one, but most are down and to the right, restarting
at upper left side once bottom of screen reached).

Note: I have only tested this on one of my machines, it should
be fine, but I'm not sure if on earlier versions of Windows
if this will result in part of the window being off the screen
or not.

A side affect of this is that if you open multiple windows,
then resize one of them and close it, subsequently opened windows
will use the last closed window's size. This isn't necessarily
a bad thing, and is of course the easiest to implement as it
is done, but would it be better to store the initial size used
and within a given process (ap_win32app instance?) continue to use
this same value (so all windows opened use the same size)?
Other options I can think of include using the size used as
above, but once a window is resized use this size for all new
windows, or if there is a way to tell the last active abiword
window, perhaps its size should be used.

Is this autoplacement behavior acceptable, or should I add the
logic to ensure each new window is opened down & to the right
from the last opened window, restarting in the upper left once
the bottom of the screen is reached?

(Also, if anyone's interested, I attached my implementation for
 the closed-won't fix bug 2120 to it. It allows specifying
 a documents file type (based on importers' descriptions) when
 opening a file from the command line.)

Thank you,
Jeremy Davis
jeremyd@computer.org




This archive was generated by hypermail 2b25 : Wed Jan 16 2002 - 14:46:55 CST