[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More than one program no longer keeps window dimensions.


On Wed, 16 Apr 2025 at 22:29, Benoît Minisini <
benoit.minisini@xxxxxxxxxxxxxxxx> wrote:

> Le 16/04/2025 à 16:10, Bruce Steers a écrit :
> > More than one of my programs are not saving/restoring window positions
> > properly any more.
> > (seems to be GTK+ only)
> >
> > in the attached program i have tracked it down to the Form_Hide event
> > triggering at least 3 times when i load the program in Tray mode.
> > (argument -t)
> >
> > The form should Show, Then quickly Hide to tray. it did this okay but
> > has broken very recently due to a change. (as have other programs)
> >
> > Even when starting normally if i hide the window the Form_Hide event
> > runs twice but the values remain the same.
> >
> > when i use the -t arg to make it hide to tray on program start the
> > Form_Hide event of FMain triggers 3 times and on the third time the
> > Height and Width are only 1
> >
> > i have Settings.Save(Me) in Form_Hide() ,
> > the third event that fires and has .H and .W as 1 then gets saved
> > (corrupted)
> >
> > I have a few programs suffering similar bugs now.
> >
> > Respects
> > BruceS
> >
>
> I can't reproduce the problem here, with KDE window manager, and X11 or
> Wayland. Maybe the problem can be caused by the WAIT instruction inside
> Form_Show()?
>
> --
> Benoît Minisini.


I just tried without it.
It's still doing the same without my workaround.

Ps. i use wait in Form_show because with GTK it lets the window appear
before running the rest of the startup code.  i guess it's a bad habit and
i should use a timer instead to do that as it doesn't work with qt.

But it's not the reason for my current problem.  weird how your system is
working differently ?

I'll figure something out. thanks for looking

Respects
BruceS

References:
More than one program no longer keeps window dimensions.Bruce Steers <bsteers4@xxxxxxxxx>
Re: More than one program no longer keeps window dimensions.Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>