ScreenRect bug or not
Richard Gaskin
ambassador at fourthworld.com
Tue Jun 3 14:10:53 EDT 2014
Terence Heaford wrote:
> In my case the working screenRect returned 0,22,1680,1046
>
> if I add 22 to item 2 for 0,44,1680,1046 it seems to work correctly
>
> Having measured the screen with Apples screen grab the point directly
> below the OS X menubar is 22 and not 44.
>
> Surely LC should return the correct co-ordinate for Mac and not rely
> on me converting a Windows co-ordinate?
Of course not. It might be a bug, but before we go there we can notice
that difference sounds suspiciously like the height of the Mac OS title bar.
In all xTalks "the rect" of a stack refers only to its content region.
In older xTalks (and older versions of LC) proper window placement
required us to hard-wire values for the Mac title bar, and query the Win
registry for that platform, and adjust accordingly.
LiveCode now does this for us with "the effective rect", which accounts
for the platform-specific window trimmings (title bar, borders, etc.).
--
Richard Gaskin
Fourth World
LiveCode training and consulting: http://www.fourthworld.com
Webzine for LiveCode developers: http://www.LiveCodeJournal.com
Follow me on Twitter: http://twitter.com/FourthWorldSys
More information about the use-livecode
mailing list