Resizing issue in 3.6

https://gfycat.com/ExaltedIllHadrosaurus (Looks choppy only in the recording.)

In Monogame 3.6, when I resize a window, as the resizing is happening, the value for Window.ClientBounds.Width and Window.ClientBounds.Height don’t get updated.

In Monogame 3.5, Window.ClientBounds.Width and Window.ClientBounds.Height would be updated in real time which made my resizing code look really good.

Am I using the wrong variables to grab the window size in this new version?

Is this a DesktopGL or DX project? And could you log an issue on GitHub for this? https://github.com/MonoGame/MonoGame/issues

I’m using DesktopGL. I could test in DX though, perhaps it happens in both.

I have found this issue. It appears to discuss the big picture related to this case: https://github.com/MonoGame/MonoGame/issues/5590

Most likely it’s just a DesktopGL issue. Are you using the ClientSizeChanged event or just checking every frame? Note that the ClientSizeChanged event is raised while resizing for DesktopGL, but only when resizing ends in DX projects (because of SDL limitations, which handles the windowing backend in DesktopGL projects).

The ClientSizeChanged event only gets called when I end the resizing in my DesktopGL project.

In my draw code though, I’m using Window.ClientBounds.Width and Window.ClientBounds.Height directly every frame.

I’ll submit a bug report.

Oh, I thought that was done wrong. Nevermind then.

Here is the issue I posted on Github btw: https://github.com/MonoGame/MonoGame/issues/5664

1 Like