window decorations ignored when restoring window position: main-window screenX/screenY in xulstore.json change at each Firefox restart

UNCONFIRMED
Unassigned

Status

()

Firefox
Session Restore
UNCONFIRMED
a month ago
14 days ago

People

(Reporter: Vincent Lefevre, Unassigned)

Tracking

(Blocks: 1 bug)

52 Branch
Unspecified
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

a month ago
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
Build ID: 20170613225334

Steps to reproduce:

1. Start Firefox.
2. Move its main window to the desired place.
3. Quit Firefox.
4. Look at xulstore.json in the profile directory (more precisely: "main-window":{..."screenX").
5. Start Firefox again.
6. Quit Firefox.
7. Look at xulstore.json in the profile directory.

and repeat steps 5-7.


Actual results:

Each time I start Firefox, its main window moves leftward, and when I look at the xulstore.json file, I can see that the main-window screenX value decreases by 4 each time Firefox is restarted. For instance, its initial value was 1107, then it changed to 1103, then to 1099.

Currently it appears as 1099. The xwininfo utility outputs:

xwininfo: Window id: 0x1800010 "Enter A Bug - Mozilla Firefox"

  Absolute upper-left X:  1099
  Absolute upper-left Y:  20
  Relative upper-left X:  0
  Relative upper-left Y:  0
  Width: 1445
  Height: 1416
  Depth: 24
  Visual: 0x2b
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x1800002 (installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: no
  Corners:  +1099+20  -16+20  -16-4  +1099-4
  -geometry 1445x1416-12+0

and FvwmIdent says: "Geometry: 1145x1228+1095+0".

So it seems that the issue is related to the window borders.


Expected results:

The main window position should remain the same (screenX shouldn't change).

Updated

a month ago
Component: Untriaged → Session Restore
Blocks: 1330633
(Reporter)

Comment 1

a month ago
This bug is also present in Firefox 54.0. It also appears with -safe-mode.

Comment 2

a month ago
I can't reproduce it with FF54 on Win 7.
(Reporter)

Comment 3

a month ago
I can't reproduce this bug on my laptop, which also runs Debian/unstable, except that it has the latest libgtk-3-0 (I've blocked the upgrade of libgtk-3-0 on the other machine to avoid some bug). The configuration is also very similar.
(Reporter)

Comment 4

14 days ago
I can still reproduce this bug on the same machine with the latest libgtk-3-0 package of Debian/unstable.
(Reporter)

Comment 5

14 days ago
Note concerning Firefox 54.0: the bug appears whether I use the Debian package or the upstream archive.
(Reporter)

Comment 6

14 days ago
This bug can be reproduced 100% of the time on my machine (which has a 2560x1440 screen) with only the following two files in the profile directory:

* prefs.js containing:

user_pref("browser.startup.homepage_override.mstone", "52.2.0");
user_pref("browser.startup.page", 3);

* sessionstore.js containing:

{"version":["sessionrestore",1],"windows":[{"tabs":[{"entries":[{"url":"http://localhost/","title":"Title","docIdentifier":0,"persist":true}],"hidden":false,"userContextId":0,"index":1}],"selected":1,"busy":false,"width":1445,"height":1416,"screenX":1099,"screenY":-20,"sizemode":"normal"}],"selectedWindow":1,"global":{}}
(Reporter)

Comment 7

14 days ago
I can reduce the window size (so that it doesn't have the full height) and now see that both screenX and screenY change at each restart:

"main-window":{"screenX":"979","screenY":"352","width":"460","height":"496","sizemode":"normal"}
"main-window":{"screenX":"971","screenY":"312","width":"460","height":"496","sizemode":"normal"}
"main-window":{"screenX":"963","screenY":"272","width":"460","height":"496","sizemode":"normal"}
"main-window":{"screenX":"955","screenY":"232","width":"460","height":"496","sizemode":"normal"}
"main-window":{"screenX":"947","screenY":"192","width":"460","height":"496","sizemode":"normal"}
"main-window":{"screenX":"939","screenY":"152","width":"460","height":"496","sizemode":"normal"}

Here, screenX decreases by 8 (due to the window borders) and screenY decreases by 40 (due to the title bar, I assume).
Summary: incorrect window position: main-window screenX in xulstore.json decreases by 4 each time Firefox is restarted → window decorations ignored when restoring window position: main-window screenX/screenY in xulstore.json change at each Firefox restart
(Reporter)

Comment 8

14 days ago
(In reply to Loic from comment #2)
> I can't reproduce it with FF54 on Win 7.

I assume that since the issue is due to window decorations, this is specific to Linux (and other X Window based platforms). I've updated the Platform field.
OS: Unspecified → Linux
You need to log in before you can comment on or make changes to this bug.