icon always opens new window instead of focus

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
mondkuchen

icon always opens new window instead of focus

Unread 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
Moon Magic practitioner
Moon Magic practitioner
Posts: 2181
Joined: 2018-05-05, 13:29

Re: icon always opens new window instead of focus

Unread 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: 1325
Joined: 2015-09-08, 22:54
Location: 127.0.0.1
Contact:

Re: icon always opens new window instead of focus

Unread 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
Moonbather
Moonbather
Posts: 72
Joined: 2017-06-09, 22:23
Location: Texas
Contact:

Re: icon always opens new window instead of focus

Unread 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
Devuan Ceres | XFCE4
"Be strong and of a good courage, fear not, nor be afraid of them: for the Lord thy God, he it is that doth go with thee; he will not fail thee, nor forsake thee."

Locked