Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

persist xul position -- not working on LX/Xubuntu?

21 views
Skip to first unread message

gNeandr

unread,
Jan 27, 2012, 10:52:17 AM1/27/12
to
An extension working on FX/TB do well with sizing and positioning after
close/re-open on WIN7 and MAC.

On Xubuntu 11.10 it works with the TB main window as expected, but not
with the extension.

Because the XUL is the same for all OSs I expect there is a bug with the
theme? Any idea how to drill down the situation?

Günter


Code used:

<window xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&rf.name;" id="editRemindersWindow"
onload="rmFx_mainDialogLoad();"
onkeypress="" commentx="" onclick="" onblur=""
width="800px" height="468px"
persist="screenX screenY width height persist-list-selectedIndex"
windowtype="window:reminderFoxEdit"
onunload="rmFx_mainDialogSaveAndClose(true);">

gNeandr

unread,
Jan 27, 2012, 11:03:20 AM1/27/12
to
Some more testing shows:

-- TB width and height persist is OK
-- TB position Not, unclear at which position it opens. It's not the
last nor somehow in the middle of the screen.

-- for the extension, persit for width/height is OK, not for screenX/Y.
The extension opens always centered to the screen.


Neil

unread,
Jan 27, 2012, 11:35:52 AM1/27/12
to
gNeandr wrote:

> An extension working on FX/TB do well with sizing and positioning
> after close/re-open on WIN7 and MAC.
>
> On Xubuntu 11.10 it works with the TB main window as expected, but not
> with the extension.
>
> Because the XUL is the same for all OSs I expect there is a bug with
> the theme? Any idea how to drill down the situation?

This is probably dependent on your window manager. Like the Windows and
Mac window managers, some respect the position that Gecko gives them;
some however do not.

--
Warning: May contain traces of nuts.

gNeandr

unread,
Jan 27, 2012, 12:15:55 PM1/27/12
to
..so I have to use 'window.screenX' ' ..Y' to move to my previously
stored values .. not that funny

Arivald

unread,
Jan 30, 2012, 5:38:36 AM1/30/12
to
W dniu 2012-01-27 18:15, gNeandr pisze:
No. You should allow window manager do what it do, unless You have very,
very good reason to override it.

In this case WM choose to center all dialog windows, for consistent user
experience.

Maybe if You change <dialog> to <window> WM will treat it differently?


Similar case (OS-dependency) is for dialog buttons. Many OSes use
different conventions, and application should follow convention.

--
Arivald

gNeandr

unread,
Feb 9, 2012, 6:14:07 AM2/9/12
to
@Arivald
Thanks for the idea to use 'persist'. That does the job for the size as
discussed in another thread.

But I have problems with working that way with the placement of the
dialog on the screen.
For the actual position (user selected position) I store the screen.X/.Y
values to values like layout1.X / layout.Y or layout2.X / layout.Y which
are defined also with 'persist'.

Changing the layout is a restore of the appropriated values to
screen.X/.Y. That works fine will the dialog is open.

But not with reopen the dialog. For sure I set the right value pair to
screen.X/.Y before closing. And also I tried to use window.moveTo(X,Y)
with the right screen.X/.Y .. delayed with settimeout fct.

But the dialog is displaced by a certain amount in both axes. Different
with W7/LX/OSX .. so I think it's theme depended.


Any good idea how to get that fixed also?

Günter

0 new messages