Re: Effective rect of stacks on Windows 10

2019-10-21 Thread Mark Wieder via use-livecode

On 10/21/19 2:03 PM, Paul Dupuis via use-livecode wrote:

  True. I just wrote a Win10 specific fix like the one Panos posted in 
the bug. Still I look forward to the day I can remove that and not have 
call a hrEffectiveRect function that returns 'the effective rect' for 
every OS except Windows 10 where it does some subtraction and then 
returns a rect.


Is there any situation in which it would be useful to have the eye candy 
included in the (effective) rect? If not, I don't understand the LC 
logic at all.


--
 Mark Wieder
 ahsoftw...@gmail.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Effective rect of stacks on Windows 10

2019-10-21 Thread Paul Dupuis via use-livecode

On 10/21/2019 4:41 PM, Richard Gaskin via use-livecode wrote:

Paul Dupuis wrote:

> When the 'effective rect' of a stack was introduced to provide the
> outer boundaries of a stack, along with the effective working
> screenRects(s), I rewrote all my complicated windows management code
> (and some of your clever tricks for Windows weirdness, Richard), to
> use simple elegant code that worked awesomely on all OSX versions and
> every Windows version until I tried it under Windows 10 and ...
>
> Not one of my happier days :-(

But at least it's a simpler workaround these day.

In the olden days the border width of a window in Windows was 
user-settable, so the only way to get that (and a few other relevant 
settings) was to obtain metrics from the Windows registry.


With Win10, if I read Mark Waddingham's comment correctly, the border 
can only be 1px, so all those old registry calls can safely go away 
with just simple hard-wired arithmetic.


 True. I just wrote a Win10 specific fix like the one Panos posted in 
the bug. Still I look forward to the day I can remove that and not have 
call a hrEffectiveRect function that returns 'the effective rect' for 
every OS except Windows 10 where it does some subtraction and then 
returns a rect.


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Effective rect of stacks on Windows 10

2019-10-21 Thread Bob Sneidar via use-livecode
As have I. 

Bob S


> On Oct 21, 2019, at 11:51 , Trevor DeVore via use-livecode 
>  wrote:
> 
> On Mon, Oct 21, 2019 at 1:31 PM Paul Dupuis via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Add your name to this bug:
>> https://quality.livecode.com/show_bug.cgi?id=16305
>> 
>> Mark Waddigham chimed in at one point that the Windows API returns the
>> 8px border width under Windows 10 - the 1px visible border and a 7px
>> "touch area" is apparently how Microsoft views it, so LC's position is
>> that this is sort of an OS vendor issue rather than their.
>> 
>> I disagree of course.
>> 
> 
> I agree with your disagreement. I've added my 2 cents.
> 
> -- 
> Trevor DeVore
> ScreenSteps
> www.screensteps.com


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Effective rect of stacks on Windows 10

2019-10-21 Thread Bob Sneidar via use-livecode
I have fits with using these rects. It ought to be as simple as saving the rect 
of a stack when closing it, and restoring it when opening it, regardless of 
what monitor is in effect. 

My problem comes in when I run the stack in a 1080p monitor at work, sleep it 
then go into the field, now Im on a retina display! Stack is now half obscured 
on the right and top. 

I've tried a number of things but I can't seem to get it to work consistently. 
I'm just going to say that this is the issue with any pixel based coordinate 
system. 

I'll probably write something that converts to screen percentages instead of 
pixels. That is really the way to do this. 

Bob S


> On Oct 21, 2019, at 11:11 , Trevor DeVore via use-livecode 
>  wrote:
> 
> I am looking for input from people who are using `the effective rect of
> stack` and the values it reports on Windows. I have some code that uses the
> effective rect of a group to determine if the stack is still on the screen
> after the user moves the stack or when restoring window positions when an
> app relaunches.
> 
> On Windows 10 I just noticed that `the effective rect of stack` includes
> the drop shadow that appears along the left, bottom, and right of a window
> on Windows 10. For my use case including the shadows in the `effective rect
> of stack` serves no value. I'm wondering if someone has a use case where it
> is helpful to have the drop shadow included in `the effective rect`?
> 
> Here is how you can check behavior if you are interested:
> 
> EXPECTED RESULT: The effective rect of a stack on Windows would return the
> rect of the stack that includes stack borders and title bar.
> 
> OBSERVED RESULT: The effective rect includes the drop shadow of the window
> in the rect.
> 
> RECIPE:
> 1. Create a new stack
> 2. Set the topleft of the stack to 0,0
> 3. `put the effective rect of this stack`. The left of the rect will be a
> negative value.
> 4. `set the effective topleft of this stack to 0,0`. The left of the stack
> will be offset by the negative value from (3).
> 
> -- 
> Trevor DeVore
> ScreenSteps
> www.screensteps.com


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Effective rect of stacks on Windows 10

2019-10-21 Thread Richard Gaskin via use-livecode

Paul Dupuis wrote:

> When the 'effective rect' of a stack was introduced to provide the
> outer boundaries of a stack, along with the effective working
> screenRects(s), I rewrote all my complicated windows management code
> (and some of your clever tricks for Windows weirdness, Richard), to
> use simple elegant code that worked awesomely on all OSX versions and
> every Windows version until I tried it under Windows 10 and ...
>
> Not one of my happier days :-(

But at least it's a simpler workaround these day.

In the olden days the border width of a window in Windows was 
user-settable, so the only way to get that (and a few other relevant 
settings) was to obtain metrics from the Windows registry.


With Win10, if I read Mark Waddingham's comment correctly, the border 
can only be 1px, so all those old registry calls can safely go away with 
just simple hard-wired arithmetic.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Effective rect of stacks on Windows 10

2019-10-21 Thread Paul Dupuis via use-livecode

Thank your Richard and Trevor.

When the 'effective rect' of a stack was introduced to provide the outer 
boundaries of a stack, along with the effective working screenRects(s), 
I rewrote all my complicated windows management code (and some of your 
clever tricks for Windows weirdness, Richard), to use simple elegant 
code that worked awesomely on all OSX versions and every Windows version 
until I tried it under Windows 10 and ...


Not one of my happier days :-(


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Effective rect of stacks on Windows 10

2019-10-21 Thread Richard Gaskin via use-livecode

Paul Dupuis wrote:

Add your name to this bug: 
https://quality.livecode.com/show_bug.cgi?id=16305


Mark Waddigham chimed in at one point that the Windows API returns the 
8px border width under Windows 10 - the 1px visible border and a 7px 
"touch area" is apparently how Microsoft views it, so LC's position is 
that this is sort of an OS vendor issue rather than their.


I disagree of course.


As do I. I've added to that report an argument in favor of correcting 
for this in the engine.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Effective rect of stacks on Windows 10

2019-10-21 Thread Trevor DeVore via use-livecode
On Mon, Oct 21, 2019 at 1:31 PM Paul Dupuis via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Add your name to this bug:
> https://quality.livecode.com/show_bug.cgi?id=16305
>
> Mark Waddigham chimed in at one point that the Windows API returns the
> 8px border width under Windows 10 - the 1px visible border and a 7px
> "touch area" is apparently how Microsoft views it, so LC's position is
> that this is sort of an OS vendor issue rather than their.
>
> I disagree of course.
>

I agree with your disagreement. I've added my 2 cents.

-- 
Trevor DeVore
ScreenSteps
www.screensteps.com
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Effective rect of stacks on Windows 10

2019-10-21 Thread Paul Dupuis via use-livecode

On 10/21/2019 2:11 PM, Trevor DeVore via use-livecode wrote:

I am looking for input from people who are using `the effective rect of
stack` and the values it reports on Windows. I have some code that uses the
effective rect of a group to determine if the stack is still on the screen
after the user moves the stack or when restoring window positions when an
app relaunches.

On Windows 10 I just noticed that `the effective rect of stack` includes
the drop shadow that appears along the left, bottom, and right of a window
on Windows 10. For my use case including the shadows in the `effective rect
of stack` serves no value. I'm wondering if someone has a use case where it
is helpful to have the drop shadow included in `the effective rect`?

Here is how you can check behavior if you are interested:

EXPECTED RESULT: The effective rect of a stack on Windows would return the
rect of the stack that includes stack borders and title bar.

OBSERVED RESULT: The effective rect includes the drop shadow of the window
in the rect.

RECIPE:
1. Create a new stack
2. Set the topleft of the stack to 0,0
3. `put the effective rect of this stack`. The left of the rect will be a
negative value.
4. `set the effective topleft of this stack to 0,0`. The left of the stack
will be offset by the negative value from (3).


Add your name to this bug: 
https://quality.livecode.com/show_bug.cgi?id=16305


Mark Waddigham chimed in at one point that the Windows API returns the 
8px border width under Windows 10 - the 1px visible border and a 7px 
"touch area" is apparently how Microsoft views it, so LC's position is 
that this is sort of an OS vendor issue rather than their.


I disagree of course.



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Effective rect of stacks on Windows 10

2019-10-21 Thread Trevor DeVore via use-livecode
I am looking for input from people who are using `the effective rect of
stack` and the values it reports on Windows. I have some code that uses the
effective rect of a group to determine if the stack is still on the screen
after the user moves the stack or when restoring window positions when an
app relaunches.

On Windows 10 I just noticed that `the effective rect of stack` includes
the drop shadow that appears along the left, bottom, and right of a window
on Windows 10. For my use case including the shadows in the `effective rect
of stack` serves no value. I'm wondering if someone has a use case where it
is helpful to have the drop shadow included in `the effective rect`?

Here is how you can check behavior if you are interested:

EXPECTED RESULT: The effective rect of a stack on Windows would return the
rect of the stack that includes stack borders and title bar.

OBSERVED RESULT: The effective rect includes the drop shadow of the window
in the rect.

RECIPE:
1. Create a new stack
2. Set the topleft of the stack to 0,0
3. `put the effective rect of this stack`. The left of the rect will be a
negative value.
4. `set the effective topleft of this stack to 0,0`. The left of the stack
will be offset by the negative value from (3).

-- 
Trevor DeVore
ScreenSteps
www.screensteps.com
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode