Closed Bug 1612738 Opened 4 years ago Closed 3 years ago

Minimum window size is too small

Categories

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

72 Branch
x86_64
Linux
defect

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: moz, Assigned: mazin, NeedInfo)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug)

Attachments

(4 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

Steps to reproduce:

  1. open a firefox window
  2. resize it to be very small

Environment: Fedora 31, GNOME shell on wayland.

Actual results:

Window is very small, to small to even fully display window decorations and the urlbar.

Expected results:

Firefox should enforce a minimum size to make sure that it at least displays the window decorations and the urlbar completely.

Component: Untriaged → Widget: Gtk
OS: Unspecified → Linux
Product: Firefox → Core
Hardware: Unspecified → x86_64

It's because the minimal size also contains CSD decorations - we should add them to minimal window size.

Blocks: wayland
Priority: -- → P3

btw. that needs to be added at nsWindow::LockAspectRatio() or nsWindow::ApplySizeConstraints().

Can I attempt to fix this? I'd love to give it a go!

(In reply to Mazin AlHaddad from comment #3)

Can I attempt to fix this? I'd love to give it a go!

Yes please, go ahead!

I think we need to add CSD size to constraints on wayland.

If this bug is still open, can I work on this? P. S. this will be my first bug.

Attached image Alpha.png

Hello, I tried to reproduce this bug on my mozilla and to me minimum window size seems to be optimum. It is creating no problems. I am working on Ubuntu 20.04 and Firefox version 83.0a1 .

Can someone help me if I am missing something. And help me proceed with this bug.

Flags: needinfo?(moz)

Hi, sorry everyone! I originally planned to get this done quickly but I got busy with work and basically forgot about it. The bug is still reproducible as long as the DE doesn't enforce a minimum size. I believe this is because we don't set a geometry for the mContainer (it's only set on mShell). I've already written a patch and will hopefully have it tested by tomorrow (setting up the environment again).

Also there is a similar bug for when someone moves into the customization section.

(In reply to Mazin AlHaddad from comment #8)

Hi, sorry everyone! I originally planned to get this done quickly but I got busy with work and basically forgot about it. The bug is still reproducible as long as the DE doesn't enforce a minimum size. I believe this is because we don't set a geometry for the mContainer (it's only set on mShell). I've already written a patch and will hopefully have it tested by tomorrow (setting up the environment again).

Hello Mazin, can you explain what does this line means :

The bug is still reproducible as long as the DE doesn't enforce a minimum size

I was trying to understand the bug but couldn't. I am also new to both open source and mozilla, so it will be of great help in understanding the code base

Flags: needinfo?(mazinalhaddad05)

I'm honestly not a very good source of information but I believe Wayland compositors can specify a minimum size for windows. You can reproduce this bug on weston.

Flags: needinfo?(mazinalhaddad05)
Flags: needinfo?(moz)

Hi could I please get some extra guidance on this? I tried to use gdk_window_set_geometry_hints() along with the geometry hints used for mShell to no avail. Am I supposed to calculate the CSD decoration size for wayland (from my understanding everything is rendered to mContainer)? Any extra info would be helpful. Thank you and sorry if this is a horrible question!

(In reply to Akshat [:baka] from comment #7)

Created attachment 9194811 [details]
Alpha.png

Hello, I tried to reproduce this bug on my mozilla and to me minimum window size seems to be optimum. It is creating no problems. I am working on Ubuntu 20.04 and Firefox version 83.0a1 .

Can someone help me if I am missing something. And help me proceed with this bug.

For me it looks similar to your picture. At least the window controls can now be reached always in my setup (GNOME/Wayland). In other words: compared to my first screenshot, the situation improved a lot: I can always access window controls, address bar and the sandwich menu button.

I still feel like the window should be larger by default, especially the height is so small that you can only see one line of the address bar popup, but the current size is something I can live with. I am not used to the process here but if you want you can reduce priority from "bug"/"defect" to "request for enhancement".

Screenshot with Firefox 84.0.2 shows that the situation improved quite a lot compared to the initial bug report.

Assignee: nobody → mazinalhaddad05
Attachment #9203803 - Attachment description: Bug 1612738 - Added minimum size for wayland window. r=stransky → Bug 1612738 - Set minimum widget size for mContainer. r=stransky
Pushed by stransky@redhat.com:
https://hg.mozilla.org/integration/autoland/rev/32e20e00382d
Set minimum widget size for mContainer. r=stransky

Also seeing the following starting to permafail with the backed out changes: https://treeherder.mozilla.org/logviewer?job_id=332206634&repo=autoland&lineNumber=30609

I'm afraid we're blocked here with the testsuite. Not sure if the failures are valid or it's just a bug. Anyway, we may want to set the minimal size to mozcontainer on Wayland only so we may call the gtk_widget_set_size_request() only in !mIsX11Display case.

Mazin, do you mind to update the patch?
Thanks.

Hi, I've updated and submitted the patch. I haven't used the automated test suite though, I'm trying to do that now.

Pushed by stransky@redhat.com:
https://hg.mozilla.org/integration/autoland/rev/308c94d72017
Set minimum widget size for mContainer. r=stransky
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: