swarm-support
[Top][All Lists]
Advanced

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

Re: Saving window positions


From: Sven N. Thommesen
Subject: Re: Saving window positions
Date: Sat, 04 Jul 1998 12:29:26 -0500

At 02:42 PM 7/2/98 -0700, you wrote:
>
>ST> If there was a way for our intrepid Swarm programmers to get absolute
>ST> coordinates saved, we wouldn't have to worry about all this. If they
can't,
>ST> the above provides a work-around.
>
>Um, I don't understand this solution or the value of the workaround. 
>What is the reason to think that a given window manager with support
>multiple desktops will do something intuitive with an
>absolute, consolidated coordinate space?

1. The problem: say you have a screen resolution of 800x600 and a virtual
4x2 desktop. This gives us (and the window manager) a total work space of
3200x1200 pixels to work with. Now run your Swarm app from the top left
virtual window (vw). Place the control panel at +5+5. Say the app has one
additional window, a raster, which you place in the top right vw, i.e. at
+2405+5 relative to the work space. Now ask your code to record window
positions. It will record +5+5 and +2405+5.

Now move the control panel one vw over, to get it out of the way of the
xterm window. I.e. we move it to +805+5. Now record window positions again.
To our great surprise, they are now recorded as +5+5 and +1605+5 !!! That
is, whoever wrote the window manager (or X) code decided to *report*
positions not relative to the whole work space, but relative to the origin
of the vw in which the app's main window is located. And if you use *those*
recorded coordinates to *place* your windows on the next run, they will now
be in the first and third vw's instead of the second and fourth, where you
originally placed them.

2. The value of the workaround: well, I had to edit ~/.swarmArchiver data
manually to show the positions I *really* wanted. (My app is perhaps more
tricky than some, in that I launch it in stages to allow the input of
starting values in swarm probe windows; thus some windows are created after
the Control Panel has been moved.)

3. The reason to think: To me, the point of the exercise is that my app has
so many windows that I *need* a virtual desktop on which to spread them
out. (They won't fit even on a 1600x1200 screen.) The choice to report
window positions relative to the app's main window instead of relative to
the workspace is some programmer's arbitrary decision, though possibly
he/she had good reasons for doing it this way. It just messes up the use of
your otherwise fine swarmArchiver.

Finally, this happens under Linux using X and fvwm95; it may not be a
problem on other platforms. If there is no way to get X+fvwm95 to report
absolute coordinates, there's not much you can do as a programmer; then my
posted workaround is the best a user can do.

Cheers,
--Sven


                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]