Windows dual screen disconnecting a screen

Hello,

We have a strange behavior that happens more and more with our software when an user using Windows (10/11) have 2 screens with different scaling percentage when deconnecting/reconnecting the screen.

Main screen:
125%

Screen 2 (connected through HDMI):
150%

Placing windows on the second screen and disconnecting/reconnecting (the number of time differs but the bug always appears at certain moment)

So when disconnecting the second screen, the opened windows of the software are now displayed on the main screen and some looks like that:

Fenetre-reduite-quand-deconnexion-dun-second-ecran

And clicking on the window does not restore it at all.

I tried some code to force all the windows to restore their minimum width/height on the activated event of the app, but I am facing a different issue where the windows are restored but with controls not displayed/drawn. Hovering them with the mouse sometimes redraw them but the labels remain gray and are not redrawn.

All the controls are in desktop containers embedded in the window.

If you have any hint on what could be the issue there.

It’s happening with Xojo 2024r2.1 and 2024r3.1

Thank you,

Julien

Are-you sure it is not a Windows behavior ?
(not a Xojo behavior ?)

Well never had this before on any other apps opened.

And I successfully restored windows using custom code but still have the issue with the gray labels.

Have you tested non Xojo application(s) ?

As you know, in Windows, the OS does not draw the window from a power off monitor in Screen(0) unlike macOS.

What you describe looks like a work in progress to change that (IMHO) thus my question.

Yes tested Firefox mostly and nothing like this happens

We see this too when using a Remote Desktop connection. When I remote into a virtual machine running Windows 11, the Remote Desktop scales to my screen. When other people remote into the same virtual machine, the Remote Desktop scales to their screen. On many occasions, when I remote in, I find the Xojo app running but the window is complete missing just like your screen shot. I haven’t tried to fix it since it is basically just annoying at this point.

Looks a lot like 70271. Please update the case.

Hello,
I am not sure if this is the same thing, well the change of scale do something but the result is not the same. The window is not “blank”. I am still investigating to see if I can have more info