Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / Platform Windows: Window Maximizing on a multi monitor system extends and zooms in to 2nd monitor.

Author
Message
Dark Raven
9
Years of Service
User Offline
Joined: 27th Jul 2014
Location: United States
Posted: 1st Oct 2022 03:02
This may be a bug. I've reported it on github but wanted to put it here too. My platform is Windows 11 and everything normal works. The window displays as it should at the size it should but when the window maximizes it acts like its maximizes on to both monitors and then zoom in really big as you can see in the images provided. This on the new updated version both downloaded from website and Steam. Hadn't tested on Classic so I don't know if the same problem happens there or just Studio.





Top image is window run in normal mode and bottom image is when the window is maximized. This worked perfectly on earlier versions.

Attachments

Login to view attachments
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 1st Oct 2022 03:15 Edited at: 1st Oct 2022 03:15
from the latest release notes:
Quote: "
  • Fixed SetWindowSize on Windows not allowing windows bigger than the screen when allowOversize parameter is set to 1
"

may have something to do with the change in behavior? ie, was it broken all along?

i only have one monitor but did you try ,0 for allowOverSized @ SetWindowSize() ?
Dark Raven
9
Years of Service
User Offline
Joined: 27th Jul 2014
Location: United States
Posted: 1st Oct 2022 03:47 Edited at: 1st Oct 2022 03:56
Tried. Didn't work. Still maximizes onto multiple monitors and zooms really big which is a major problem.

Also went back to a previously compiled test project and ran the executable which was compiled with a previous version and everything worked as it should when maximizing the window. Was just checking to see if it was something with my computer system but because it worked with previous version it is something to do with the current updated version.
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 1st Oct 2022 04:01 Edited at: 1st Oct 2022 04:26
i just want to be clear before i tag the issue, it's the Player that has the issue and not the Studio IDE, right?

Attachments

Login to view attachments
Dark Raven
9
Years of Service
User Offline
Joined: 27th Jul 2014
Location: United States
Posted: 1st Oct 2022 04:05 Edited at: 1st Oct 2022 06:28
IDE seems to work fine with the maximize. It when I compile and run. I’ve also checked running exe outside of ide and same thing.

Also does it compiling with the updated classic.

Just checked the display size returned by GetDeviceWidth and GetDeviceHeight.

When I maximize it is reading the device width and height 8176x8153 which larger than the resolutions for both monitors.
James H
17
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 1st Oct 2022 14:54 Edited at: 1st Oct 2022 17:05
I can confirm same for me - I have 2 displays, both the same resolution,. The left hand one is my laptop and the right hand one just an additional flat-screen. However, ordinarily the system chooses the laptop as the main monitor which I have changed so the additional display is my main as it is my preference due to that display being physically much larger. When I have the window on just the main display - maximized - it is fine other than when I toggle between maximized/restore it does flash momentarily onto the laptops display but as a slight overlap.

This overlap roughly matches an issue that existed prior to the latest update - a separate issue perhaps - when allowing resize of a window, the screen co-ordinates for the mouse pointer would have say about 20 pixels on the left hand side that have a negative value. Of course the right side always 20 pixels (maybe not exactly 20 pixels I don't recall) shorter than the reported resolution. Not only that, not matter what the virtual res was set at it would always start at 0 not the -20 pixels or so that it should start at. There was also no method to retrieve this offset that I could see. Whether this is a multi monitor issue or not I have not tested. In essence print commands show results 20 pixels in unless you go full-screen and there is no way of detecting this offset to make amendments to positions of text command in code or indeed sprite or pointer positions.

So far I have not confirmed the exact bug as described by OP - however it does do as described when I maximize the window onto the laptop display. It may not be obvious what the OP has described - those screenies threw me for a moment or two as I thought the right hand side of the screenies was a desktop background lol - this is because the overall screen shot matches my own display layout as I tend to use IDE on left also when compiling leaving my desktop background repeated on the right hand display...so that second screen shot looked initially to me as though you where running the window just on left monitor. I was also confused(and still am) what is meant by looking really zoomed in?)

EDIT: I want to be clear that although I state my desktop background is repeated it is just the wallpaper, the multi monitor setup is the desktop stretched over two monitors and not duplicate desktops, as I say just the wallpaper is duplicated

Having got past that I could see right away on my own system the screenies are accurate but one thing that did not come across in the description to me at least was the fact that the overstretch did not display anything other than the clear colour/clear screen command usage. A 3d cube and print() command only display on the monitor maximized and it looks dreadful. On my display it has a massive odd white border(see screeny). One thing that may be related is the fact you cannot drag the mouse pointer along the bottom or top edges of display from the larger screen to the smaller but can vice versa. Even though both displays are set 1920*1080 the mouse pointer gets stuck and remains on the larger display which is OS behavior not agk, agk is just repeating this. There is a disparity between physical display sizes and maximum display res's for each - both my displays are maximum 1920*1080, also the laptop is 144Hz and the other display is 75Hz. There is no apparent correlation obvious to me regarding these frequencies as I have tried to set them both at 60 with no affect on the agk app results.

However that white border on the main window is NOT part of the window frame itself - the apparent "zoom" referred to by the OP is not just a zoom but an apparent separation of windows or perhaps an incorrect duplication internally?? Basically only the right hand side of my screeny shows a window title bar, and only by double clicking the right hand sides title bar can the window be restored, the max/restore/min/close buttons are missing, probably off screen to the right, the white border on the left display has zero window border/title bar access. Not only that but while repeatedly maximizing/restoring that white border on left display changes slightly - see second screeny. This is not the best part - the best part is that I have say chrome open behind the laptops display, the white section does not belong to agk - I can hover over buttons invisibly and the mouse pointer not only changes to match hovering over browser buttons, but gives me access to the browser, sometimes it does bring the browser to the front other times I can skip songs invisibly if I guess right location or change anything if I guess right from any web page! It was difficult to manage access of the thinner white sections but the bottom section works very easily in the manner I have described.

What I guess I am also saying here is that this isn't just a latest update issue. There is stuff going on that was related to windows prior to latest update and i feel that the results in the latest update are perhaps bad because of previous underlying issues - if you can't get the virtual res/pointer issue sorted I don't see how multi monitor setups would work, its only going to exaggerate any previous issues?
Win 7 Pro 64 bit SP1, AMD A4-5300 APU 3.4GHz, 8GB DDR3, NVidia GeForce GTX 750 1GB GDDR5, ASUS A55BM-E

Attachments

Login to view attachments
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 1st Oct 2022 18:27 Edited at: 1st Oct 2022 18:42
skimming the source:
Quote: "// Note that on Windows and Mac the backbuffer size is changed by modifying the size of the window, so it will overwrite any settings from SetWindowSize."

...might provide some insight.

what do GetDeviceWidth and GetDeviceHeight report when not maximized? GetMaxDeviceWidth/Height?

otherwise, MadBit's FileExplore may have some commands that could help. i thought there was some recent discussion there regarding detection of Maximized (a work-around, not a GetMaximized() command) that might prove useful so you could manually account for/work around the issue but i'm not seeing it.

ah, i was searching for "Max" while it was discussion re: Minimized. i've used the suggestion when Maximized:
...and it's reported -11 for the X so that may help detect Maximized similarly.
Dark Raven
9
Years of Service
User Offline
Joined: 27th Jul 2014
Location: United States
Posted: 1st Oct 2022 19:58
Getdevicewidth and height returns 1024x768 which is what the window is set at. Though other sizes did the same. Im not at my computer now to test max display so will later. I just know that when maximized display with showed 8000+ for both width and height.

I did try tier 2 and it worked as it should so maybe it's something with the tier 1 player. Maybe?
Dark Raven
9
Years of Service
User Offline
Joined: 27th Jul 2014
Location: United States
Posted: 12th Nov 2022 22:23
I know this has been originall posted at the end of september but...

I came across another weird thing that fall under this. When the player is running on the display that isn't primary I can actually maximize as usual but once the player moves back to the primary display that is when scaling and window size become wacky. I was able to resolve my issue by recompiling the interpreter from the tier 2 stuff and commenting out the following lines from the core.cpp file. The lines don't appear in the regular tier two templates just the interpreter.

This is from the WinProc Function

Login to post a reply

Server time is: 2024-04-24 22:59:36
Your offset time is: 2024-04-24 22:59:36