Alex313031 / Mercury

Firefox fork with compiler optimizations and patches from Librewolf, Waterfox, and GNU IceCat.
https://thorium.rocks/mercury
Mozilla Public License 2.0
1.02k stars 26 forks source link

Mercury doesn't handle panel/taskbar correctly #144

Open luketeam5 opened 4 months ago

luketeam5 commented 4 months ago

Hello,

I noticed a small issue with Mercury on Linux Mint. When I pin it to the panel and then close and reopen the browser, it opens as a new window rather than within the existing icon. Here's a screenshot for reference: image

I also captured a video of this issue when I pin the browser and then open it: https://github.com/Alex313031/Mercury/assets/40070133/aadc5770-ff0c-4859-bfbc-b232762755ea

I'm not sure what I might be doing wrong, as Mercury works without any problems on my Windows laptop. Any help would be greatly appreciated.

Thank you.

Alex313031 commented 3 months ago

@luketeam5 Can you edit (with sudo permissions) /usr/share/applications/mercury-browser.desktop, and change the line StartupWMClass=mercury to StartupWMClass=mercury-browser and see if that fixes it?

luketeam5 commented 3 months ago

Thanks for your response,

sadly that does not fix the issue even after a full restart & reinstall. image

Here is some additional debug information:

luketeam5 commented 3 months ago

Hello @Alex313031!

I wanted to let you know that I found the issue - it was indeed related to the WMClass as you thought. It should have been named mercury-default instead of mercury (default) or mercury-browser (which you suggested).

To locate the correct WMClass, I ran GNOME terminal using Alt+F2 and entered the command lg to view active windows. image Then, I switched to the Windows tab to find the correct WMClass. image

After adding this correction to the desktop file (/usr/share/applications/mercury-browser.desktop) and restarting Mercury, it opened properly. image

I won't close this issue yet, as it still seems like a bug that needs to be addressed. I hope the steps I provided will be helpful in resolving the issue. Thank you!

slrgt commented 3 months ago

@luketeam5 what do you install to use lg?

luketeam5 commented 3 months ago

Nothing, LookingGlass is a part of the GNOME desktop environment. You can check the wiki for yourself here (https://wiki.gnome.org/Projects/GnomeShell/LookingGlass).

---------- Původní e-mail ---------- Od: slrgt @.> Komu: Alex313031/Mercury @.> Kopie: luketeam5 @.>, Mention @.> Datum: 29. 3. 2024 7:19:50 Předmět: Re: [Alex313031/Mercury] Mercury doesn't handle panel/taskbar correctly (Issue #144) "

@luketeam5(https://github.com/luketeam5) what do you install to use lg?

— Reply to this email directly, view it on GitHub (https://github.com/Alex313031/Mercury/issues/144#issuecomment-2026739460), or unsubscribe (https://github.com/notifications/unsubscribe-auth/AJRWX5N7LBFS26F65SDUSJ3Y2UBYBAVCNFSM6AAAAABDY2ME4CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRWG4ZTSNBWGA) . You are receiving this because you were mentioned. Message ID: <Alex313031/ @.***> "

slrgt commented 3 months ago

ah, it doesnt seem to be included in pop os. Well I can just edit the mercury-browser.desktop without using lg. It worked :) thanks!