usableDesktop

Jacques Hausser jacques.hausser at unil.ch
Tue Apr 2 09:05:20 EDT 2013


Hi Richmond,

your little routine computes the place to be spared to the RIGHT, you should
use items 2 and 4 for setting the TOP of your stack.

By the way, to add to my previous post, I tried to put the dock to the left side and the working screenrect gives: 45,22,1680,1050
thus it seems usable (at least on mac): in my case, we are 22 off the top, 45 off the left side. For the right and the bottom, they are still some computiation to do, if for example you want to set the maxheight and the maxwidth of your stack. 

One learns everyday: what I discovered today is that the effective screenRect is a sub-option of the working screenRect. It seems rather logical because the (unavailable) effective screenRect should be a huge virtual surface allowing for accessory screens and so on. Probably limited by the maximum values of a signed integer or something like that.

Jacques

Le 2 avr. 2013 à 14:14, Richmond <richmondmathewson at gmail.com> a écrit :

> On 04/02/2013 02:12 PM, Mark Schonewille wrote:
>> Hi Richmond,
>> 
>> Do the working screenRects do what you want?
> 
> on Linux 'working screenRects' returns exactly the same values as 'screenRect'
> 
> on Macintosh 10.6.7 'working screenRects' returns 0,22,1920,1032 and 'screenRect returns 0,0,1920,1080
> 
> on Windows 7 'working screenRects' returns 0,28,1920,1180 and 'screenRects' returns 0,0 1920,1080
> on a monitor resolution of 1920,1080 !!! LOL !!!
> 
> So:
> 
> 1. Linux: NBG.
> 
> 2. Macintosh; tells you what the usable desktop is, but doesn't tell you "how much off the top"
> and "how much off the bottom".
> 
> 3. Windows 7: I really wonder what was going on there.
> 
> Now; let us suppose our end-user (who we don't know, and we know nothing at all about
> his/her desktop) has 'something' cluttering up the top of his 1920 x 1080 desktop by 64 pixels,
> and 'something else' cluttering up the bottom by 96 pixels, and something cluttering up
> the left-hand side by 40 pixels.
> 
> At best (!!!!) 'working screenRects' is going to return 0,x,1880,920.
> 
> What this does NOT tell us is that s/he has 64 off the top and 96 off the bottom; so when we want to
> set the top of our stack so it is at the top of the usable desktop it is no good at all.
> 
> What this, also, does not tell us, is that s/he has 40 off at the left (rather than, say, 25 on the right and 15 on the left).
> 
> And, if I have a happy little routine in my main stack something like this:
> 
> on openStack
>   put item 3 of the screenRect into SCR3
>   put item 3 of the working screenRects into WSCR3
>   put (SCR3 - WSCR3) into HANGDOWN
>   set the top of stack "myNonsense" to HANGDOWN
> end openStack
> 
> my stack's top will end up 96 pixels below the end-user's top 'something'.
> 
> Q.E.D.
> 
> Richmond.
> 
>> 
>> -- 
>> Best regards,
>> 
>> Mark Schonewille
>> 
>> Economy-x-Talk Consulting and Software Engineering
>> Homepage: http://economy-x-talk.com
>> Twitter: http://twitter.com/xtalkprogrammer
>> KvK: 50277553
>> 
>> Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other colour spaces. http://www.color-converter.com
>> 
>> We have time for new software development projects. Contact me for a quote.
>> 
>> On 4/2/2013 09:32, Richmond wrote:
>>> I am beginning to hate
>>> 
>>> get the screenRect
>>> 
>>> because, while it lets us know how large somebody's screen resolution is,
>>> it does NOT tell us what "GUI furniture" they have lying around such as
>>> taskbars, menubars, docks and so on.
>>> 
>>> Imagine, if you will, the 2 following scenarios:
>>> 
>>> 1. Windows 7 with a 'small icons' taskbar situated at the TOP of the
>>> desktop, and an ObjectDock
>>>     set at 64 pixels positioned at the bottom of the screen.
>>> 
>>> 2. Elementary OS  [ http://elementaryos.org/journal/when-its-ready ]
>>> (which, by-ther-way, is, at least
>>>     at the moment, rubbish) with NO menubar, NO taskbar, and everything
>>> accessed via
>>>     a 64 pixel avant window navigator dock positioned at the bottom of
>>> the screen.
>>> 
>>> systemVersion is going to tell me the OS, and nothing else.
>>> 
>>> screenRect is going to include all that GUI furniture (menubars,
>>> taskbars, docks) within the pair
>>>                    of numbers it will give me.
>>> 
>>> Now, how about having some sort of more useful pair of numbers that
>>> allows us to make sure that our
>>> standalones can avoid all those things.
>>> 
>>> On Mac OS 10 (all versions) life is, frankly, dead easy (although rather
>>> boring) as the menubar is
>>> always (????) at the top of the screen and it is always 44 pixels fat.
>>> Mind you, the Dock at the
>>> bottom of the screen may be present (at differing fatnesses), playing
>>> peek-a-boo, or absent.
>>> 
>>> My fantasy runs like this:
>>> 
>>> on openStack
>>>    get usableDesktop
>>> end openStack
>>> 
>>> but I have a horrible feeling that it will remain a fantasy as
>>> cyberspace is filled to bursting
>>> with lots and lots of window managers (imagine coping with Windows XP
>>> running KDE as a window manager) and lots and lots of docks.
>>> 
>>> Richmond.
>>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

******************************************
Prof. Jacques Hausser
Department of Ecology and Evolution
Biophore / Sorge
University of Lausanne
CH 1015 Lausanne
please use my private address:
6 route de Burtigny
CH-1269 Bassins
tel: 	++ 41 22 366 19 40
mobile:	++ 41 79 757 05 24
E-Mail:	jacques.hausser at unil.ch
*******************************************





More information about the use-livecode mailing list