Closed Bug 1770636 Opened 3 years ago Closed 2 years ago

Wrong StartupWMClass in .desktop file of the flatpak version

Categories

(Core :: Widget: Gtk, defect)

Firefox 100
x86_64
Linux
defect

Tracking

()

VERIFIED FIXED
103 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox-esr102 102+ fixed
firefox100 --- wontfix
firefox101 --- wontfix
firefox102 --- fixed
firefox103 --- verified

People

(Reporter: soljanka, Assigned: emilio)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(3 files)

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

Steps to reproduce:

In bug 1640153 the StartupWMClass was added to the .desktop file for flatpak to prevent instances not shown with the same icon. The following line was added to the file:

StartupWMClass=Firefox

Unfortunately this is case sensitiv. xprop WM_CLASS returns the following
WM_CLASS(STRING) = "Navigator", "firefox"

Actual results:

This results in Firefox still launching with a second icon as seen in the attached screenshot.

Expected results:

The solution is quite simple. Change StartupWMClass=Firefox to StartupWMClass=firefox with a lowercase f and Firefox will launch with the same Icon.

Blocks: flatpak
See Also: → 1751153

https://searchfox.org/mozilla-central/rev/fb319b5522a5e9fc126a9b2d2650aa49cc88e40a/taskcluster/docker/firefox-flatpak/org.mozilla.firefox.desktop#54 needs to be changed to lowercase.

(Emilio Cobos Álvarez (:emilio) from bug 1759663 comment 4)

Yeah, so this changed in bug 1530052. It was kind of an intentional change to make WMClass and wayland app id consistent.

Blocks: 1640153
Component: Untriaged → Widget: Gtk
Keywords: regression
OS: Unspecified → Linux
Product: Firefox → Core
Regressed by: 1530052
Hardware: Unspecified → x86_64

Set release status flags based on info from the regressing bug 1530052

:heftig, since you are the author of the regressor, bug 1530052, could you take a look?
For more information, please visit auto_nag documentation.

Flags: needinfo?(jan.steffens)

I think this is similar to bug 1759663, and if we let the window class start with a capital letter (by removing our override and just setting the prog name) this bug would be fixed as well.

That is, assuming that Wayland tools consistently compare the strings case-insensitively where X11 tools like plank do not.

Flags: needinfo?(jan.steffens)
Has Regression Range: --- → yes

The bug has a release status flag that shows some version of Firefox is affected, thus it will be considered confirmed.

Status: UNCONFIRMED → NEW
Ever confirmed: true

Set release status flags based on info from the regressing bug 1530052

emilio, is that something you know about? Thanks

Flags: needinfo?(emilio)
Assignee: nobody → emilio
Flags: needinfo?(emilio)

Pending further changes iff we want to do them (like comment 5), this is the
right thing to do.

I'm not a fan of comment 5 since in the past I've been bitten by Wayland
compositors not comparing stuff case-insensitively, so making everything
lowercase is probably simpler.

Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8bc2a43e9ac0 Fix StartupWMClass of flatpak package to match actually-used WMClass. r=jhorak
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 103 Branch
QA Whiteboard: [qa-103b-p2]

Emilio, is that something we could want in a 102 dot release and ESR102? Thanks

Flags: needinfo?(emilio)

I don't know if we do flatpack ESR releases and how we build them. Do you know?

If we do and use the flatpack script from the tree then sure, it's harmless.

Flags: needinfo?(emilio) → needinfo?(pascalc)

I don't know either but given that it is just a typo fix, it feels safe to just uplift it to the release and esr102 branches.

Flags: needinfo?(pascalc)

Comment on attachment 9282247 [details]
Bug 1770636 - Fix StartupWMClass of flatpak package to match actually-used WMClass. r=jhorak,stransky

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: Trivial one-liner fix to Flatpak desktop file.
  • User impact if declined: comment 0
  • Fix Landed on Version: 103
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Simple lowercasing of the WMClass.

Beta/Release Uplift Approval Request

  • User impact if declined: see above.
  • Is this code covered by automated tests?: Unknown
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: none
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): see above
  • String changes made/needed: none
  • Is Android affected?: No
Attachment #9282247 - Flags: approval-mozilla-release?
Attachment #9282247 - Flags: approval-mozilla-esr102?

Comment on attachment 9282247 [details]
Bug 1770636 - Fix StartupWMClass of flatpak package to match actually-used WMClass. r=jhorak,stransky

Approved for 102.0.1, thanks.

Attachment #9282247 - Flags: approval-mozilla-release? → approval-mozilla-release+

Issue was reproduced using Firefox 101.
The issue is verified fixed using the latest Fx 103.0b5. The typo in the .desktop file is now fixed and correctly written as 'firefox'. Please note that the 102.0.1 can't be verified as the published build on flathub beta is the 103.0b5 build.

Status: RESOLVED → VERIFIED

Comment on attachment 9282247 [details]
Bug 1770636 - Fix StartupWMClass of flatpak package to match actually-used WMClass. r=jhorak,stransky

Approved for 102.1esr.

Attachment #9282247 - Flags: approval-mozilla-esr102? → approval-mozilla-esr102+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: