icon always opens new window instead of focus

Support and discussions for the x86/x64 Linux version of Pale Moon and specific Linux distribution questions related to the browser.

Moderator: trava90

Forum rules
If your question is about general use of the browser and not specific to Linux, then please use the General Support board.
Post Reply
User avatar
mondkuchen
New to the forum
New to the forum
Posts: 2
Joined: 2019-03-20, 17:07

icon always opens new window instead of focus

Post by mondkuchen » 2020-10-02, 10:10

I'm using Palemoon 28.14.1 on Ubuntu 20.04, Gnome3. I'm having that problem for a long time, and didn't find anything to solve it: If Palemoon has already one window open and I click on the launcher icon in the Gnome3-bar, one more Palemoon-window shows up, instead of focussing the one that's already opened. Also a 3rd, 4th and so on shows up if I click the icon again. The command for the launcher icon runs "palemoon %u".
Any idea how to just get the focus for the first window?

vannilla
Board Warrior
Board Warrior
Posts: 1186
Joined: 2018-05-05, 13:29

Re: icon always opens new window instead of focus

Post by vannilla » 2020-10-02, 11:47

Is there a way to see what that %u is subsituted with?
You might want to research on that.

User avatar
Isengrim
Board Warrior
Board Warrior
Posts: 1278
Joined: 2015-09-08, 22:54
Location: 127.0.0.1
Contact:

Re: icon always opens new window instead of focus

Post by Isengrim » 2020-10-02, 13:59

I don't recall the Pale Moon (or Firefox, for that matter) launcher on Linux (or Windows, for that matter) ever focusing the current window instead of opening a new one. I assume that this is intentional. I don't believe there's a way to change the launcher to do this, either.

As for the %u argument: It specifies that any arguments passed to the launcher be passed as a URL. See here.
a.k.a. Ascrod
Linux Mint 19.3 Cinnamon (64-bit), Debian Bullseye (64-bit), Windows 7 (64-bit)
"As long as there is someone who will appreciate the work involved in the creation, the effort is time well spent." ~ Tetsuzou Kamadani, Cave Story

User avatar
EMH_Mark_I
Apollo supporter
Apollo supporter
Posts: 46
Joined: 2017-06-09, 22:23

Re: icon always opens new window instead of focus

Post by EMH_Mark_I » 2020-10-02, 15:52

I've looked into this and noticed that the .desktop launcher has a few typos for the "StartupWMClass" key (if you installed this from Steve's repository.)

Code: Select all

StartupNotify=false
StartupWMClass="pale moon"
Should be:

Code: Select all

StartupNotify=true
StartupWMClass=Pale moon
The StartupNotify=true is perhaps a matter or preference, but helpful for notifying the user of its startup.
The "P" has to be capitalized and the quotes aren't necessary. This should make the launcher a little more friendly for application dockbars. You can apply the adjustment yourself, however it will be replaced when updated.
I'm not so sure if StartupWMClass is used by the GNOME desktop, but it may be required for others. Removing it from the .desktop launcher and setting StartupNotify to true will also resolve the issue.

https://developer.gnome.org/integration ... on.html.en
https://specifications.freedesktop.org/ ... 01s06.html
https://specifications.freedesktop.org/ ... on-0.1.txt
Xubuntu | XFCE4

"It's said the road to hell is paved with good intentions. It is with the same good intentions that we blindly place our trust in those with power, the architects of our future and all too often, the manipulators of our ultimate fate." -- The Outer Limits

Post Reply