Skip to content
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

Missing icon in Wayland window #3743

Open
tegridyfarmer opened this issue Dec 9, 2024 · 8 comments
Open

Missing icon in Wayland window #3743

tegridyfarmer opened this issue Dec 9, 2024 · 8 comments

Comments

@tegridyfarmer
Copy link

Your Environment

  • Version used: Flatpak
  • Operating System and version: Fedora Linux 41 6.11.10-300.fc41.x86_64
  • Desktop Environment: KDE Plasma 6.2.4
  • Browser Name and version:

Expected Behavior

To show the SuperProductivity icon for the window in the task overview, taskbar and window bar.

Current Behavior

Shows a stock Wayland icon for the window in the task overview, taskbar and window bar.

Steps to Reproduce (for bugs)

Below you can find the steps to replicate the issue.
I have also a few screenshots of the bug.
image
image

  1. Open KDE Plasma in a Wayland session.
  2. Use flatpak-kcm or flatseal to add ELECTRON_OZONE_PLATFORM_HINT=auto as an environment variable.
  3. Check the described issue.

Can you reproduce this reliably?

It does not hapen once, it can be reproduced reliably.

Console Output

Nothing relevant shows up.

Error Log (Desktop only)

Maybe this could be useful: https://nicolasfella.de/posts/fixing-wayland-taskbar-icons/

Copy link

github-actions bot commented Dec 9, 2024

Thank you very much for opening up this issue! I am currently a bit overwhelmed by the many requests that arrive each week, so please forgive me, if I fail to respond personally. I am still very likely to at least skim read your request and I'll probably try to fix all (real) bugs if possible and I will likely review every single PR being made (please, give me a heads up if you intent to do so) and I will try to work on popular requests (please upvote via thumbs up on the original issue) whenever possible, but trying to respond to every single issue over the last years has been kind of draining and I need to adjust my approach for this project to remain fun for me and to make any progress with actually coding new stuff. Thanks for your understanding!

@aripollak
Copy link
Contributor

aripollak commented Dec 9, 2024

I suspect this is a flatpak-specific issue that could be fixed by running patch-desktop-filename during the build, outlined here: https://docs.flatpak.org/en/latest/electron.html#using-correct-desktop-file-name
This doesn't seem to be an issue under GNOME Shell.

@tegridyfarmer
Copy link
Author

I got the same issue when running the rpm with --ozone-platform-hint=auto.

@aripollak
Copy link
Contributor

Running from the commandline might be hitting this caveat from electron/electron#35997:

Notes: Fixed v8 flags and desktop name in package.json does not hornored when running local app using electron cli.

aripollak added a commit to flathub/com.super_productivity.SuperProductivity that referenced this issue Dec 9, 2024
aripollak added a commit to flathub/com.super_productivity.SuperProductivity that referenced this issue Dec 9, 2024
@tegridyfarmer
Copy link
Author

tegridyfarmer commented Dec 9, 2024

I just installed the .rpm file and it has the stock wayland icon in taskbar and task overview.
The shortcut error, this is because I disabled X11 keyboard shortcuts in Wayland.

~/Downloads superproductivity --ozone-platform-hint=auto  
Start app...
21:39:42.246 › { enabled: null, showDevTools: false, mode: 'bottom' }
Saving backups to /home/user/.config/superProductivity/backups
21:39:42.606 › Saving backups to /home/user/.config/superProductivity/backups
21:39:44.473 › No custom styles detected at /home/user/.config/superProductivity/styles.css
ERR Global Shortcut registration failed: Ctrl+Shift+X
21:39:44.651 › Error: Global Shortcut registration failed: Ctrl+Shift+X
    at errorHandlerWithFrontendInform (/opt/Super Productivity/resources/app.asar/electron/error-handler-with-frontend-inform.js:10:18)
    at /opt/Super Productivity/resources/app.asar/electron/ipc-handler.js:181:101
    at Array.forEach (<anonymous>)
    at registerShowAppShortCuts (/opt/Super Productivity/resources/app.asar/electron/ipc-handler.js:140:18)
    at IpcMainImpl.<anonymous> (/opt/Super Productivity/resources/app.asar/electron/ipc-handler.js:110:9)
    at IpcMainImpl.emit (node:events:519:28)
    at WebContents.<anonymous> (node:electron/js2c/browser_init:2:86186)
    at WebContents.emit (node:events:519:28)
21:39:44.652 › Global Shortcut registration failed: Ctrl+Shift+X Error: Global Shortcut registration failed: Ctrl+Shift+X
    at errorHandlerWithFrontendInform (/opt/Super Productivity/resources/app.asar/electron/error-handler-with-frontend-inform.js:10:18)
    at /opt/Super Productivity/resources/app.asar/electron/ipc-handler.js:181:101
    at Array.forEach (<anonymous>)
    at registerShowAppShortCuts (/opt/Super Productivity/resources/app.asar/electron/ipc-handler.js:140:18)
    at IpcMainImpl.<anonymous> (/opt/Super Productivity/resources/app.asar/electron/ipc-handler.js:110:9)
    at IpcMainImpl.emit (node:events:519:28)
    at WebContents.<anonymous> (node:electron/js2c/browser_init:2:86186)
    at WebContents.emit (node:events:519:28)
21:39:44.653 › Additional Error info:  Ctrl+Shift+X

The appimage has similar output and same result:

~/Downloads ./superProductivity-x86_64.appimage --ozone-platform-hint=auto 
Start app...
21:43:10.753 › { enabled: null, showDevTools: false, mode: 'bottom' }
Saving backups to /home/user/.config/superProductivity/backups
21:43:11.678 › Saving backups to /home/user/.config/superProductivity/backups
21:43:14.037 › No custom styles detected at /home/user/.config/superProductivity/styles.css
ERR Global Shortcut registration failed: Ctrl+Shift+X
21:43:14.225 › Error: Global Shortcut registration failed: Ctrl+Shift+X
    at errorHandlerWithFrontendInform (/tmp/.mount_superPEL7uBh/resources/app.asar/electron/error-handler-with-frontend-inform.js:10:18)
    at /tmp/.mount_superPEL7uBh/resources/app.asar/electron/ipc-handler.js:181:101
    at Array.forEach (<anonymous>)
    at registerShowAppShortCuts (/tmp/.mount_superPEL7uBh/resources/app.asar/electron/ipc-handler.js:140:18)
    at IpcMainImpl.<anonymous> (/tmp/.mount_superPEL7uBh/resources/app.asar/electron/ipc-handler.js:110:9)
    at IpcMainImpl.emit (node:events:519:28)
    at WebContents.<anonymous> (node:electron/js2c/browser_init:2:86186)
    at WebContents.emit (node:events:519:28)
21:43:14.226 › Global Shortcut registration failed: Ctrl+Shift+X Error: Global Shortcut registration failed: Ctrl+Shift+X
    at errorHandlerWithFrontendInform (/tmp/.mount_superPEL7uBh/resources/app.asar/electron/error-handler-with-frontend-inform.js:10:18)
    at /tmp/.mount_superPEL7uBh/resources/app.asar/electron/ipc-handler.js:181:101
    at Array.forEach (<anonymous>)
    at registerShowAppShortCuts (/tmp/.mount_superPEL7uBh/resources/app.asar/electron/ipc-handler.js:140:18)
    at IpcMainImpl.<anonymous> (/tmp/.mount_superPEL7uBh/resources/app.asar/electron/ipc-handler.js:110:9)
    at IpcMainImpl.emit (node:events:519:28)
    at WebContents.<anonymous> (node:electron/js2c/browser_init:2:86186)
    at WebContents.emit (node:events:519:28)
21:43:14.227 › Additional Error info:  Ctrl+Shift+X

@tegridyfarmer
Copy link
Author

Sorry to bother you @aripollak.
I was wondering wether you happen to know a possible solution for the non-flatpak version?

@aripollak
Copy link
Contributor

Sorry, I'm not sure. I had only noticed that instruction for flatpak when extracting binaries from another package, which is required since the .desktop filename changes for flatpak.

@aripollak
Copy link
Contributor

I guess the thing that fixes it for KDE is that flatpak uses com.super_productivity.SuperProductivity as the desktop filename and updates the embedded package.json to match?
Via https://community.kde.org/Guidelines_and_HOWTOs/Wayland_Porting_Notes#Application_Icon and https://docs.flatpak.org/en/latest/electron.html#use-correct-desktop-filename

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants