user-none / KDocker

Dock most applications to the system tray
GNU General Public License v2.0
301 stars 22 forks source link

Empty application icon (for Mozilla Thunderbird) #135

Closed birdie-github closed 5 days ago

birdie-github commented 3 weeks ago

I run Thunderbird 128.2.0esr (Fedora 40/XFCE, my own build) this way:

kdocker -m thunderbird

Version 5.4 found and showed the application icon.

Version 6.0 starts with its own icon and then it turns into something empty/completely transparent.

user-none commented 3 weeks ago

Works for me on Ubuntu.

daxpedda commented 1 week ago

I can confirm this as well, happened with the official Flatpak build of Thunderbirdand and the AUR build of KDocker in a KDE desktop environment.

Interestingly, setting the icon in the command line manually doesn't seem to work either, but setting it via the GUI works.

user-none commented 1 week ago

with the official Flatpak build of Thunderbirdand the AUR build of KDocker

Are you missing an "and" in this sentence? It's not working with both the flatpak and building from source via AUR?

user-none commented 1 week ago

I can't replicate the issue. Thunderbird's icon always shows properly for me in the system tray.

I tested Fedora 40 with KDE and installation of Thunderbird installed with dnf and by installing via the offical flatpak. KDocker was tested by installing the flatpak and by building from source.

Steps I went through for testing.

  1. I installed Fedora 40 with KDE
  2. Installed Thunderbird using each of the following.
    1. sudo dnf install thunderbird
    2. flatpak install flathub org.mozilla.Thunderbird
  3. Installed KDocker
    1. flatpak install kdocker-6.0-arm64.flatpak
    2. build from source
  4. Logged in using plasma desktop (X11)

The dnf install was uninstalled before installing via flatpak. At no point were both system and flatpak installs of Thunderbird installed at the same time. I tried all of the following with all combinations of the above install methods and all show the Thunderbird icon in the system tray properly.

  1. Started Thunderbird
  2. Started KDocker from the command line (one of)
    1. flatpak run com.kdocker.KDocker
    2. ./kdocker
  3. Docked Thunderbird with KDocker
  4. Icon shows properly in the system tray

I also tried:

  1. Started Kcalc
  2. Docked Kcalc using KDocker via the command line (one of)
    1. flatpak run com.kdocker.KDocker
    2. ./kdocker
  3. Started Thunderbird
  4. Docked Thunderbird using the "dock another" menu option
  5. Icon shows properly in the system tray

I also tried:

  1. Started Thunderbird
  2. Started KDocker from the menu
  3. Docked Thunderbird with KDocker
  4. Icon shows properly in the system tray

I also tried:

  1. Started Kcalc
  2. Started KDocker from the menu
  3. Docked Kcalc
  4. Started Thunderbird
  5. Docked Thunderbird using the "dock another" menu option
  6. Icon shows properly in the system tray

I also tried:

  1. Started Thunderbird
  2. Started KDocker from the command line and the -n flag (one of)
    1. flatpak run com.kdocker.KDocker -n thunderbird
    2. ./kdocker -n thunderbird
  3. Docked Thunderbird with KDocker
  4. Icon shows properly in the system tray

I also tried using KDocker to launch Thunderbird. Only tested with dnf installed Thunderbird and source build of KDocker.

  1. ./kdocker thunderbird
  2. Thunderbird runs
  3. Icon shows properly in the system tray

The command line tests were all done with and without the -m option.

I've tried pretty much every combination of docking using KDocker and tested on two different distros. In all cases the icon for Thunderbird shows properly. There really isn't anything more I can do.

birdie-github commented 1 week ago

Could you please try running the official Thunderbird with Fedora or your distro, doesn't matter, as long as the distro version is not installed?

You could get it here: https://ftp.mozilla.org/pub/thunderbird/releases/128.2.3esr/linux-x86_64/

No installation is required:

tar xf thunderbird-128.2.3esr.tar.bz2
cd thunderbird && kdocker -m ./thunderbird

Thank you!

Daxx commented 1 week ago

This sounds like the problem I mentioned here

The new method of recovering icons fixed many but broke some others. The previous method has been removed.

user-none commented 1 week ago

Could you please try running the official Thunderbird with Fedora or your distro

I tried the official flatpak provided by Mozilla on Fedora.

You could get it here: https://ftp.mozilla.org/pub/thunderbird/releases/128.2.3esr/linux-x86_64/

Unfortunately, I can't test builds from this location. They don't have an arm package and I only have an arm laptop.

birdie-github commented 1 week ago

This sounds like the problem I mentioned here

The new method of recovering icons fixed many but broke some others. The previous method has been removed.

I'm confused. Does this pull request fix the issue or introduce the issue?

It's merged as of version 6.0 that I tried using.

user-none commented 1 week ago

I'm confused. Does this pull request fix the issue or introduce the issue?

It fixes issues with icons for a lot of applications and it is part of 6.0. The comment by Daxx of Sublime Text not working in that PR could be related to what you're seeing with Thunderbird. However, I couldn't reproduce the issue with Sublime Text either. Sublime installed via their official apt repository or installed by Snap both show the icon properly with KDocker 6.0.

daxpedda commented 1 week ago

with the official Flatpak build of Thunderbirdand the AUR build of KDocker

Are you missing an "and" in this sentence? It's not working with both the flatpak and building from source via AUR?

Yes. But seems you have tried out all combinations already and I don't have a minimal reproducible example for you so I think its appropriate to close the issue as well.

On a side note: v5 worked correctly for me, so it broke with v6 (tried it with the AUR version of KDocker).

Thank you for looking into it nevertheless!

user-none commented 1 week ago

I'm going to reopen because I have an idea that might work but since I can't reproduce I'll need someone to test. I should have a branch with the changes for testing sometime this evening.

user-none commented 1 week ago

A tray-icon branch has been made with some reworking of some of the icon code. It also added in some basic debug that gets written to the console. Can some experiencing the issue build this branch and see what it does. Run from the console and provide the output too please.

username227 commented 1 week ago

Whatever you did worked. Thanks!

Building was easier than I expected. The AUR package gives me an error if I build outside of a chroot, and I expected the same error when building manually, but I didn't get it.

Output: ❯ ./kdocker Select the application/window to dock with the left mouse button. Click any other mouse button to abort. getWindowIconNetWMIcon icon format 32

Daxx commented 1 week ago

Works for me, also.

Run from the console and provide the output too please.

I get the same for all docked apps (ones that worked before and ones that were broken -- Sublime Text, gnome-calculator, etc.)

Select the application/window to dock with the left mouse button.
Click any other mouse button to abort.
getWindowIconNetWMIcon
icon format 32
Select the application/window to dock with the left mouse button.
Click any other mouse button to abort.
getWindowIconNetWMIcon
icon format 32
Select the application/window to dock with the left mouse button.
Click any other mouse button to abort.
getWindowIconNetWMIcon
icon format 32
Select the application/window to dock with the left mouse button.
Click any other mouse button to abort.
getWindowIconNetWMIcon
icon format 32
Select the application/window to dock with the left mouse button.
Click any other mouse button to abort.
getWindowIconNetWMIcon
icon format 32
Select the application/window to dock with the left mouse button.
Click any other mouse button to abort.
getWindowIconNetWMIcon
icon format 32
user-none commented 1 week ago

I've added protection to prevent empty icons from being used. Worst case, the internal not found icon will be used so at least there is something.

user-none commented 1 week ago

Icon fixes have been merged to main.

user-none commented 5 days ago

6.1 released which closes this out.

birdie-github commented 5 days ago

@user-none

Confirming fixed, thanks a ton!

What's not fixed is #49.

user-none commented 5 days ago

49 is not a bug in KDocker. It is an issue with the window manager you're using.

birdie-github commented 5 days ago

Is there a way to confirm it without using kdocker?

For instance when I press an application item in the task bar, it gets minimized, then I press it again, it gets maximized, AFAIK all without the window manager's input, i.e. everything is working as expected.

The same applies to applications that support systray natively, i.e. Audacious.

I'm using Fedora 40 with XFCE.