-
-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
All PWAs in the same profile are merged with the first PWA that was opened (Linux Wayland-only) #80
Comments
|
Is it possible to programmatically select the correct Firefox window and then set its WM_CLASS? But then we will still need something similar for Wayland... Well, maybe the best solution is to report a bug/suggestion to Firefox that |
I created a bug on Bugzilla. Feel free to upvote or comment if you have any useful info, but please don't spam it with unnecessary comments. |
Hi, Have a different firefox profile for each PWA ? That's how I do it manually, the --class / WMCLASS is relative to one profile. You may eventually synchronize all these PWA profiles with your personal mozilla account ( ie. synchronize only passwords and history. ) You may look at https://github.com/linuxmint/webapp-manager which also aims at PWA. Be aware also that native host messaging is not yet implemented in snap and flatpak ( Linux ) packaging. |
not sure what do you mean by that - in context of which code you say 'select'?
as you were hinted above, xprop code is good candidate how to manipulate WM_CLASS , i.e. how to get and how to set you may take a look for :
sorry, but why? |
on general level, I'm not sure whether use of Firefox profiles is wise. E.g. in my personal case, I use Firefox profiles as namespace, i.e. I have separate entities which help me to be in certain context, i.e. personal or one of numerous but particular work (or non-personal) contexts. So there is me (personal profile), work (my tiny company), work for 1 (main client 1), community (my participation in certain community). This way at least different main credential web login (or few) kept intact. to project into more clear case for you, I may have created PWA links to Google Meet windows, but in one window it will use my personal Gmail account, and all others it will use respective Google Workspace identity per each other profile. in this context, asking me to create separate profile on each PWA window might be too much. it might be wiser to add in your firefox add-on simple function - besides creation of new profile each time (if you do need it, as you see, I don't), I could re-use existing profiles of Firefox, so I just select existing ones. |
After a web app is launched, the code (which launches Firefox runtime here) needs to detect which window has just been opened so it can apply the new WM_CLASS to it.
I'm not sure if
PWAs will always have to use a different profile system than the main due to how required Firefox modifications are allowed. However, you can still use the same PWA profile on multiple PWAs and replicate your profiles setup for PWAs. When you install a new PWA, just select an existing profile instead of the option to create a new one. The reason that the separate profile for each PWA is default is that because of this issue when you opened multiple PWAs from the same profile at the same time, all of them get merged together in the taskbar. |
…ferent web apps This is related to #80. It will work after BZ-1747722 / PHAB-169720 is merged to Firefox.
Per the latest comment on bugzilla, I have installed Firefox 112.0 in Arch. I am able to have multiple separate web apps using the same profile without any obvious issues. As I (mostly coincidentally) just tried this out for the first time today, I'm not 100% sure what I would have expected to have seen prior to 112.0, but I am currently running separate Google pages as their own separate web apps, and I only had to log in on one of them. So perhaps this issue can be changed to "update the messaging (and perhaps the default selection) in the browser extension"? |
Yes, this issue should have been fixed since PWAsForFirefox 2.5.0 and Firefox 112.0. I've waited before updating the warning in the extension until Firefox 112.0 is released, so I'll update it in the next release. But I've discovered another problem on Linux when multiple web apps are installed to the same profile and opened together. When changing the titlebar color is enabled, the text and window control colors are changed based on color to provide contrast. However, when multiple web apps are opened and they have different colors (for example, one light and another dark), window control colors in all windows are changed to the same color, so window controls in one window become less visible or even invisible. I don't think there is an easy way to fix this, so I'll open a new issue for this soon. Then, I'll have to decide whether it's better to disable titlebar color changing on Linux by default and change the profile selection in the extension, or to keep the theme color changing enabled and installation in new profiles selected by default but just update the warning message. |
I created #322 for that new issue about window control colors. For now, I decided just to change the warning message and keep the default selection in the extension the same. |
Hi! This bug appears to be fixed, but the warning when creating a new PWA still appears. Should we still follow the warning, or the writing should be removed as the bug is fixed? Thanks a lot, @filips123! |
The original problem (merging multiple web apps) has been fixed and the fix has already been released. The warning message has also been updated but this change hasn't been released yet. However, there is another problem that affects when there are multiple web apps in the same profile (#322). It's a smaller problem and has a workaround (disable "Allow web apps to override a theme (titlebar) color" in the app browser settings). If you do this workaround, it should be fine to install multiple web apps to the same profile. |
I tested this again, and it appears this issue is still not fixed on Wayland with the The original fix is implemented in Firefox by using I might try to use @julian-klode I'm continuing the discussion here because this is the relevant issue for Linux. |
Oh thanks, sorry about the comment in the wrong bug, I didn't see a Linux issue, didn't expect it to be closed I guess :) |
I submitted a patch to Firefox that should also fix this issue on Wayland. |
The patch has been merged and should be available in Firefox 120 (released on 2023-11-21). |
Description
All PWAs are merged with the first PWA that was opened. This only applies to Linux.
When some PWA is already running, all newly launched PWAs will merge with it and remain merged until all of them are closed. This will cause the app menu to display all PWAs as part of the first PWA that was launched, with its icon and desktop actions (if any).
Users can prevent this by installing each PWA into a different profile.
Steps to Reproduce
Possible Solution
This cannot be fixed easily. The native part of the project currently launches Firefox with the
--class
argument, which should set theWM_CLASS
property of the window to the PWA ID. However, because all Firefox processes in the same profile are connected together, all windows have WM_CLASS of the first PWA. Fixing this would probably require modifying Firefox C++ code. Check this comment and related discussions for ideas and possible solutions to fix this.The text was updated successfully, but these errors were encountered: