[7.7.1] Initial window positions with mutliple monitors on MacOSX

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[7.7.1] Initial window positions with mutliple monitors on MacOSX

Randy Coulman
I've got an iMac with an external monitor (actually two with a Matrox DualHead2Go, but VW sees them as 2 monitors).  The main iMac screen is on the right, and the externals to the left.

Screen default getScreenDimensions answers  #(#(0 0 1680 1050) #(-3200 -150 0 1050))

I like to put my windows on the middle screen, but when I save and re-open my image, they all come up in odd positions on the main monitor.

I was able to debug this a bit tonight (using the very handy #stdout method), and I've tracked this down to Window>>createSurfaceWithForcedPosition: (and a bit beyond).

For one example, when my image is opening, the following message send is happening (actual values in comments):

self graphicsDevice
      allocateWindowAt: creationOrigin  "-1343 @ 23"
      extent: width @ (height + statusLineHeight)  "500 @ 399"
      min: self getMinimumSize  "300 @ 125"
      max: self getMaximumSize  "nil"
      windowType: flags   "65538"
      owner: owner  "nil"

If I then immediately display the results of self getDimensions, I get back:

#(897 23 500 399 0 false)

The first two elements of this are the origin of the window.

So it looks like the Screen>>allocateWindowAt:extent:min:max:windowType:owner: (primitive 906) is changing my desired window position to something that fits in the main screen  (from -1343 @ 23 to 897 @ 23).

A couple of other examples:
-842 @ 22  ==> 278@22  (extent 550 @ 400)

and a stranger one:
-1343 @ 444 ==> 897 @ -388   (extent 1051@756)

In this last case 444 + 756 > 1050 (the height of my main screen), so it's shifting it up, but i'm not sure why it's shifting it so high.

I'm not sure where to go from here to fix this problem.  I really want my windows to come back up where I left them.

Any ideas?

Thanks,
Randy
--
Randy Coulman
[hidden email]

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc