[Gambas-user] Window position error on applying stored "geometry"

RICHARD WALKER richard.j.walker at ...247...
Sun Jun 3 04:15:02 CEST 2012


On 03/06/2012, Bruce <bbruen at ...2308...> wrote:
> On Sun, 2012-06-03 at 01:24 +0100, RICHARD WALKER wrote:
>> Using Gambas 3.1.1 as distributed with Mageia 2. I believe it may be
>> somewhat patched as it includes Mageia in the packaging wizard
>> distribution selection screen.
> No, Mageia is in the original.

Ah, OK. It wasn't in the Cauldron Gambas until very recently (a week
or few). MGA2 went live last weekend.

>> I was wondering if this is only an issue with Gambas 3 on the LXDE
>> desktop, but I cannot test this as I am keeping this machine
>> lean'n'mean; that means KDE4 and Gnome 3 are not allowed near it.
> I'm with you there Richard! :-)  I've been using LXDE since the first KDE4
> debacle was released

I stayed with KDE 3 on Mandriva 2008.1 for many years. Discovering
LXDE was "a good thing". We can only hope that packagers can keep
their greedy fingers off it and resist the temptation to make it
depend on bloatware like Pulseaudio. Sadly that is a forlorn hope for
Mageia. When will people learn that slim, resource-efficient desktops
might possibly be used on equipment which does not have the spare
capacity for such frilly extras?

>
> Now this is a wild guess, but are you running lxpanel at the top of the
> screen?  There is an outstanding bug regarding this going back about 2
> years or so, especially if it has the default name.

Yes and no. I have been running my "task bar" equivalent at the top of
the screen since the mid- to late-eighties. Never got out of the
habit. It seems my mouse muscles just expect it that way.

On the other hand, my brother is running on a converted Jolibook with
a ridiculously restricted screen height of 600! His lxpanel is like
yours, down the left. Having re-written the settings writing routine
to correct for the top lxpanel offset it suddenly occurred to me that
it might creep right on his screen.

> I run mine down the left hand side and
> 1) Settings.Write and Settings.Read both work fine

Ah, but have you tried it with a desktop spread across two screens? I
had to change the writing method to work around the crash bug, but as
it writes out a Geometry= string it can be read quite well with
Settings.Read.

> 2) The window does not move down the screen.
>

It would move right though - I tested it and modified my offset
calculation to take account of vertical panels too. Happily, if the
panel is on the right or at the bottom then no offset is necessary.
So, now we have:

Select Case True
        Case offset < 0
                Settings["Window/Geometry"] = [Fmain.Left + offset,
FMain.Top, Fmain.Width, Fmain.Height, 0]
        Case offset > 0
                Settings["Window/Geometry"] = [Fmain.Left, FMain.Top -
offset, Fmain.Width, Fmain.Height, 0]
        Case offset = 0
                Settings["Window/Geometry"] = [Fmain.Left, FMain.Top,
Fmain.Width, Fmain.Height, 0]
End Select

The offset parameter passed to the procedure is first negated for
width offsets and zero is passed if either the panel's X>0 or Y>0. The
height offset is passed as a positive parameter.

> Anyway the sun just came out in Strathalbyn and I'm off to lunch! So
> best of luck.
> Bruce

You are kidding, right? Do you know any girls called Sheila? Aren't
national stereotypes a pain?

"O wad some Pow'r the giftie gie us
 To see oursels as others see us"

That only works if others see us in a clear, true light. Speaking of
which, the sun'll be up here soon enough - time for bed.

Richard




More information about the User mailing list