Screen coordinates for the main Squeak window/host windows

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

Screen coordinates for the main Squeak window/host windows

Eliot Miranda-2
 
Hi John, Hi Vanessa, Hi HostWindowPlugin folks,

    I've managed to compute window rectangles for WindowEventMetricChange events correctly on macOS/Cocoa.  But I'm not sure whether the origin of a window includes its menu bar or not.

So should the origin of  the Squeak Window be reported as the position relative to the top left of the Mac's main display of...
- the origin of the host window containing the Squeak window ?
- the origin of the Squeak display (which is menuBarHeight screen coordinates further down than the window origin) ?

Similarly should the HostWindowPlugin report window origins and sizes for the actual host window, or form the content of the window, offsetting downwards by the menu bar height?
_,,,^..^,,,_
best, Eliot
Reply | Threaded
Open this post in threaded view
|

Re: Screen coordinates for the main Squeak window/host windows

codefrau
 
Maybe check Chrome's "Multi-Screen Window Placement API" docs?


Another idea would be to check what X11 window managers do - I think they do respect app's placement wishes.

No time to get into this atm unfortunately. 

- Vanessa -

On Tue, Oct 13, 2020 at 12:50 PM Eliot Miranda <[hidden email]> wrote:
Hi John, Hi Vanessa, Hi HostWindowPlugin folks,

    I've managed to compute window rectangles for WindowEventMetricChange events correctly on macOS/Cocoa.  But I'm not sure whether the origin of a window includes its menu bar or not.

So should the origin of  the Squeak Window be reported as the position relative to the top left of the Mac's main display of...
- the origin of the host window containing the Squeak window ?
- the origin of the Squeak display (which is menuBarHeight screen coordinates further down than the window origin) ?

Similarly should the HostWindowPlugin report window origins and sizes for the actual host window, or form the content of the window, offsetting downwards by the menu bar height?
_,,,^..^,,,_
best, Eliot