Open Bug 1800343 Opened 2 years ago Updated 2 years ago

New windows are full size but not maximized, problem in xulstore

Categories

(Core :: Widget: Gtk, defect, P3)

defect

Tracking

()

People

(Reporter: Oriol, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Attached video 2022-11-12 21-40-44.mkv (obsolete) —
  1. Create a new profile, just with these files:

    • prefs.js
      user_pref("browser.tabs.inTitlebar", 1);
      
    • xulstore.json
      {"chrome://browser/content/browser.xhtml":{"main-window":{"width":"1920","height":"1044","sizemode":"maximized"}}}
      
      Note: replace the width and height with the size of a maximized window, you can open a web console and enter screen.availWidth and screen.availHeight.
  2. Open Firefox, you will get one maximized window

  3. Open a new window (Ctrl+N)

Expected: you get a new maximized window
Actual: you get a window which is full size but it's not considered to be maximized:

  • There is some space at the left of the tabbar (supposedly so that you can drag the non-maximized window)
  • If you try to drag some text into the tabbar, but the mouse goes to the very top of the window, then it won't work, very annoying

This problem is affecting various old profiles of mine, it seems that removing xulstore.json does the trick, but most users won't know this fix, and if they are annoyed they will just uninstall Firefox and switch to Chrome.

Attached video screen_recording.mp4
Attachment #9303172 - Attachment is obsolete: true

The severity field is not set for this bug.
:mossop, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(dtownsend)

(In reply to Oriol Brufau [:Oriol] from comment #0)

This problem is affecting various old profiles of mine, it seems that removing xulstore.json does the trick.

What does the newly generated xulstore.json look like after this?

Severity: -- → S4
Flags: needinfo?(dtownsend) → needinfo?(oriol-bugzilla)

Somehow I got the problem again, with

"main-window":{"screenX":"-45","screenY":"-45","width":"1920","height":"1044","sizemode":"maximized"}

After removing that, I got the non-problematic

"main-window":{"screenX":"-45","screenY":"-45","width":"1280","height":"939","sizemode":"maximized"}
Flags: needinfo?(oriol-bugzilla)
Flags: needinfo?(sfoster)

Does this still happen :Oriol? What is your actual display resolution(s)? Are you running more than one display? Are you perhaps switching displays between sessions? I'm not able to reproduce with the STR from comment 0, so there must be some other variables in play.

Notes to self: I was motivated to look into into this to ensure there wasn't some Sessionstore intersection, but it seems not. I see the sizemode and width/height attributes being pulled from the xulstore during startup, but ISTM either sizemode is "maximized" or it is not.

Flags: needinfo?(sfoster) → needinfo?(oriol-bugzilla)

My setup is like this: I have 2 different PCs connected to a HDMI switch, connected to a single monitor. With the switch I can decide which PC is shown. The PC that is not shown just considers the HDMI as disconnected. When connected, the resolution is 1920x1080 for both.

Both devices have had this problem, but right now it's only happening in one of them.

I think I have also seen this problem in my laptop (in that case I never connect it to external monitors nor anything), but I could be misremembering.

I'm using KDE plasma in the 3 of them.

Flags: needinfo?(oriol-bugzilla)

:mossop, can you help triage and direct this? It seems reasonable for xulstore.json to have whatever dimensions and attributes, but there may be an issue in how these are handled during startup. I took a look at this code in BrowserGlue.sys.mjs but if that's where the bug is, its not jumping out at me. I don't have a way to reproduce this, but it seems plausible that we might need to compare to available screen width/height before we create the window? Or do we expect the OS / window manager to do that for us?

Flags: needinfo?(dtownsend)

(In reply to Oriol Brufau [:Oriol] from comment #6)

My setup is like this: I have 2 different PCs connected to a HDMI switch, connected to a single monitor. With the switch I can decide which PC is shown. The PC that is not shown just considers the HDMI as disconnected. When connected, the resolution is 1920x1080 for both.

It's odd that the resolution is 1920x1080 yet above the "correct" xulstore.json appears to have 1280x939 for the size. Do you have any scaling applied to the screens?

(In reply to Sam Foster [:sfoster] (he/him) from comment #7)

:mossop, can you help triage and direct this? It seems reasonable for xulstore.json to have whatever dimensions and attributes, but there may be an issue in how these are handled during startup. I took a look at this code in BrowserGlue.sys.mjs but if that's where the bug is, its not jumping out at me. I don't have a way to reproduce this, but it seems plausible that we might need to compare to available screen width/height before we create the window? Or do we expect the OS / window manager to do that for us?

I'm not sure. It's certainly valid to have a window extend beyond the bounds of the available screen space. Did you mean to link to some code here?

I don't use scaling.

Component: General → Widget: Gtk
Flags: needinfo?(dtownsend)
Product: Firefox → Core
Priority: -- → P3

Possibly related: bug 1683224

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: