[Gambas-user] an observation on window placement with multiple screens
Benoit Minisini
benoit.minisini at gambas-basic.org
Thu Oct 13 18:18:08 CEST 2022
Le 13/10/2022 à 17:44, Bruce Steers a écrit :
>
>
> On Thu, 13 Oct 2022 at 13:43, Benoit Minisini
> <benoit.minisini at gambas-basic.org
> <mailto:benoit.minisini at gambas-basic.org>> wrote:
>
> 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.
>
>
> I thought the "one big screen" was only relevant to virtual desktops not
> physical displays/monitors?
> Virtual desktop positions is also pretty uncontrollable as you can get
> window positions but they are relevant to the active window.
> So for an application that has a window on desktop 1 and 2 from desktop
> 1 window positions for both windows are window 1 as normal and window 2
> is it's position + screen width but if on desktop 2 window 2 is normal
> and window 1 is position - screen width.
> That's a bit confusing but can be dealt with.
>
> The problem though is you cannot re-open a window on another desktop as
> you cannot set a screen position greater than a single screen width or
> less than 0 so windows only ever open on the active desktop
>
> So the problem here is not to do with virtual desktop screens as they in
> fact do open windows on the relevant desktop.
> it's actual physical displays
>
> Respects
> BruceS
>
I don't see physical screens from the toolkits. I see only one big
logical screen, with part of it associated with a screen number.
Regards,
--
Benoît Minisini.
More information about the User
mailing list