[Gambas-user] an observation on window placement with multiple screens

Benoit Minisini benoit.minisini at gambas-basic.org
Thu Oct 13 14:42:24 CEST 2022


Le 13/10/2022 à 14:03, Bruce Steers a écrit :
> I want to handle it first hand, not after via save/restore a setting
> if i use Settings.Write(MyForm)
> It saves the window geometry and the screen number so i could read the 
> Form.Settings property but Benoit has stated this syntax may change so 
> it's not wise to use it.
> I've looked at the Screen class and there is no ID or Number property to 
> get data about the current screen.
> 
> Can the Screens[] array Index be a reliable Id, so Screens[1] is 1 as 
> the Form.Settings would save it?
> 
> Can i tell what screen my open application is on?
> Then force other windows like Dialogs and Messages and widows that have 
> not had their position saved to be on the chosen screen?
> 
> If not then i think gambas could really do with this feature.
> It was not my experience that all other applications behaved this way. 
> only some.
> 
> Respects
> BruceS
> 

The problem are the following:

- You can't directly specifiy the screen a window is. You can only 
specify its position, and the screen is deduced from that position (all 
screens making one sole big logical screen).

- The window manager decides where a window appears. On X11, you can 
suggest a position.

- On Wayland, you can't specify a window position!

So it's almost impossible to have a window opening intelligently 
automatically in all cases. I will think a bit and see what I can do, 
but I'm afraid that on Wayland we can't do anything.

Regards,

-- 
Benoît Minisini.



More information about the User mailing list