ChangeDisplaySize options on AmigaOS3

Report any Hollywood bugs here
Post Reply
User avatar
jPV
Posts: 466
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

ChangeDisplaySize options on AmigaOS3

Post by jPV »

If you use X/Y position options with the ChangeDisplaySize() function, window drawing bugs on OS3 with certain window dimensions. This doesn't seem to happen on MorphOS, OS4, or Windows versions, but on OS3 (68k/WOS compiled exes).

Smaller window gets normal window borders:
Image

Bigger ones overwrite display graphics over window borders:
Image

When you deactivate the window, borders are drawn over the display gfx, hiding the printed text in this example.

Code: Select all

ChangeDisplaySize(1277, 600, {X=#KEEPPOSITION, Y=#KEEPPOSITION})
Print(GetAttribute(#DISPLAY, 0, #ATTRWIDTH), GetAttribute(#DISPLAY, 0, #ATTRHEIGHT))
WaitLeftMouse()

User avatar
airsoftsoftwair
Posts: 4980
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: ChangeDisplaySize options on AmigaOS3

Post by airsoftsoftwair »

Not sure if I understand this correctly but the fact that Hollywood kills the window borders for the 1277x600 window is actually a feature. It does that because a 1277x600 window doesn't fit on the screen when keeping the window's current x position. That's why Hollywood automatically turns the window into a borderless one. If you move the window a little bit to the left first, it won't be turned into a borderless window because there's enough space now.

User avatar
jPV
Posts: 466
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: ChangeDisplaySize options on AmigaOS3

Post by jPV »

Ok, but two things:

1) Why this does happen only on OS3 compiled exes (or scripts anyway), but not with MorphOS, OS4, or Windows compiled exes? Is it because they can (optionally) have off-screen window placement? MorphOS compiled and OS3 compiled exes act differently when run on the same MorphOS setup. OS3 version loses the borders, but MorphOS version keeps them, both will still automatically place the window a bit left so that they fit on the screen.

2) Is this a helpful feature at all? Does removing borders help that much? It's just few pixels what it gains there and most likely it wouldn't fit on the screen after the removal either and the window position is forced to move on left/up still (on systems where it can't go off screen). I find it more annoying that display attributes are randomly set to something else that I set them originally...

User avatar
airsoftsoftwair
Posts: 4980
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: ChangeDisplaySize options on AmigaOS3

Post by airsoftsoftwair »

jPV wrote:
Sat Jun 18, 2022 10:56 am
1) Why this does happen only on OS3 compiled exes (or scripts anyway), but not with MorphOS, OS4, or Windows compiled exes? Is it because they can (optionally) have off-screen window placement?
Yes, classic AmigaOS can't open windows that are partially off-screen.
jPV wrote:
Sat Jun 18, 2022 10:56 am
2) Is this a helpful feature at all? Does removing borders help that much?
It might not be very helpful in your specific context but generally I think it is. Imagine the following situation: The script opens an 800x600 display and the user's workbench screen is 800x600. The script is configured to run in a bordered window. Now if Hollywood didn't automatically switch to borderless in that case, the script would fail to run on that system. By automatically killing the window decorations, it can run on the screen, though.

User avatar
jPV
Posts: 466
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: ChangeDisplaySize options on AmigaOS3

Post by jPV »

But is it necessary to kill the decorations if the window would fit on the screen? Why it both switches to borderless and moves the window in the cases when it still would fit on the screen with the decorations too?

I ran my example on a 1920x1080 screen, so 1277x600 window should fit just fine on it with borders.

Post Reply