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

bb adamnt42 at gmail.com
Thu Oct 13 15:16:20 CEST 2022


On Thu, 2022-10-13 at 14:42 +0200, Benoit Minisini 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,
> 
There are acouple of things here that I'd like to comment on.

First, I see and agree with Benoit that "the window manager decides
where a window appears". It is a right royal pain that most window
managers either deny nor respect any wish that a window should appear
on a particular "screen" i.e a specific virtual desktop "screen".
Windows will appear by default on the current virtual desktop, no
matter how I wish otherwise.

Secondly, and more importantly as BruceS has intimated, there is no way
that I can control where modal popups or message windows appear. But my
wish would be this... 
I would really like the popups to be centered in the window that called
the popup not just in the center of the screen. For example 1) when
using an extended screen across two "X terminals" popups appear
centered exactly on the entire screen. In other words, half on my
primary display and half on the extended display. This is bad enough if
both displays are running at the same resolution and worse if they are
not. For example 2) if I am running several instances of a project
tiled on the display (whether using an extended display or not) the
popup appears in the center of the screen. This gives me no indication
of which instance the message (for instance) belongs to. It would be
much more preferrable that it was in the center of the window that it
belongs to.

Sorry if I have mixed terminals, screens and displays up here but it
has been a long and ongoing problem. Please, Benoit, make the popups
appear in the center of the window that caused the popup.

regards
bruce (t'other one)



More information about the User mailing list