ClientSizeChanged - Detect End of window drag for resize

I tried this and I got something that looked like this:

Console output

Is that what you had in mind?

Following the output, if you look at the before and after apply changes, it looks to me like the client bounds keeps bouncing back to the “before” dimensions even though I’ve attempted to change them.

That makes sense because I still have the button down for the drag. If SDL honored that, it would have to pull the corner away from the mouse location and maybe terminate the drag (or really mess up the visuals).

Edit… i didnt have a lot of time to look at this earlier now that im looking it over and looking at the video i think this is surely monogame updating values incorrectly.

In the video i can clearly see the the x text position is correct but the y position isn’t it scrolls.
However i know that the way drawstring works it is in fact always drawn to the same position err at the proper position.

This means that as you resize in the video up left the Y coordinate of the rectangular drawing surface is actually being moved up. While the X coordinate of the window drawing surface is moving proper with the resize.

Edit2: the preffered backbuffer Height appears to be the problem;

You might try setting the preffered back buffer values in your OnResize callback using the clientbounds width and height. Try not calling apply changes inside that OnResize method and leave the rest of everything as is. If that doesn’t work then add in the calling to applychanges in your OnResize callback as well and see if it actually works. However the preffered backbuffer isn’t changing in each pass in the console output even when other values are, so im thinking its somehow being reset. Then you get that upscrolling effect on the text.

These two passes below don’t appear to exhibit the same behavior.
Additionally the height in the second call hasn’t changed.
While most of the Width values have from the first to the second.

so im thinking this is a monogame bug.

  ------ changes that occured -----------
           ---------------------------------------

           // these lines don't match the behavior of the procceding set of calls

           diff Window.ClientBounds CHANGE FROM {X:552 Y:273 Width:727 Height:500} TO {X:543 Y:309 Width:612 Height:313}

           // the bounds here are Not immediately changed in the from value

           diff gd.PresentationParameters.Bounds CHANGE FROM {X:0 Y:0 Width:727 Height:500} TO {X:0 Y:0 Width:612 Height:313}


           diff gd.PresentationParameters.BackBuffer(WidthHeight) CHANGE FROM {X:727 Y:500} TO {X:612 Y:313}
           diff gd.Viewport CHANGE FROM {X:0 Y:0 Width:727 Height:500 MinDepth:0 MaxDepth:1} TO {X:0 Y:0 Width:612 Height:313 MinDepth:0 MaxDepth:1}
           diff gd.Viewport.TitleSafeArea CHANGE FROM {X:0 Y:0 Width:727 Height:500} TO {X:0 Y:0 Width:612 Height:313}

           ---------------------------------------
            [ClientWindowResized]:6
                After ApplyChanges():
           ------ changes that occured -----------
           ---------------------------------------
            
           // note here the from >727<, >500< to 612, 500
           // were did the 313 value goto that it previously wanted to apply in the last pass ?
           // It appears the backbuffers changes have not actually been applied or rather they have been unapplyed ?

           // the to value here only shows that the width is to change ?

           diff gdm.PreferredBackBuffer(Width Height) CHANGE FROM {X:727 Y:500} TO {X:612 Y:500}

           // then here from >612<, 313 to 612, >500<

           diff Window.ClientBounds CHANGE FROM {X:543 Y:309 Width:612 Height:313} TO {X:543 Y:216 Width:612 Height:500}

           diff gd.PresentationParameters.Bounds CHANGE FROM {X:0 Y:0 Width:612 Height:313} TO {X:0 Y:0 Width:612 Height:500}
           diff gd.PresentationParameters.BackBuffer(WidthHeight) CHANGE FROM {X:612 Y:313} TO {X:612 Y:500}
           diff gd.Viewport CHANGE FROM {X:0 Y:0 Width:612 Height:313 MinDepth:0 MaxDepth:1} TO {X:0 Y:0 Width:612 Height:500 MinDepth:0 MaxDepth:1}
           diff gd.Viewport.TitleSafeArea CHANGE FROM {X:0 Y:0 Width:612 Height:313} TO {X:0 Y:0 Width:612 Height:5