mate-desktop / mate-panel

MATE panel
https://mate-desktop.org
GNU General Public License v2.0
183 stars 115 forks source link

Window List icons fail to show on Wayland #1436

Open DMJC opened 4 months ago

DMJC commented 4 months ago

Expected behaviour

Window List Buttons should display icon images

Actual behaviour

Generic broken image is shown instead, image below image Images load/work fine on X11 with the same executable.

Steps to reproduce the behaviour

Run mate-panel on wayland.

MATE general version

1.28

Package version

1.28 (built using debuild)

Linux Distribution

Debian Trixie 13

lukefromdc commented 4 months ago

I have the icons showing without issue but there are LOTS of variables here. What compositor are you using? What distro? What icon theme? What GTK3 version? All of these could affect finding the icons, but usually that work without problems though I have seen issues with wayfire's windecor and firedecor plugins finding icons, enough so that they both include a better looking default icon.

You should have the window list button icons showing though, we need to find out what is different between your install and mine.

Whether I use the experimental mate-wayland-session, launch mate-panel in a plain wayfire session, or even launch it in sway or mir, I always get the window list button icons.

DMJC commented 4 months ago

I'm using wayfire, Adwaita-dark and mate icons.

On Wed, 6 Mar 2024, 10:55 am Luke from DC, @.***> wrote:

I have the icons showing without issue but there are LOTS of variables here. What compositor are you using? What distro? What icon theme? What GTK3 version? All of these could affect finding the icons, but usually that work without problems though I have seen issues with wayfire's windecor and firedecor plugins finding icons, enough so that they both include a better looking default icon.

You should have the window list button icons showing though, we need to find out what is different between your install and mine.

Whether I use the experimental mate-wayland-session, launch mate-panel in a plain wayfire session, or even launch it in sway or mir, I always get the window list button icons.

— Reply to this email directly, view it on GitHub https://github.com/mate-desktop/mate-panel/issues/1436#issuecomment-1979860552, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFS2Y3XMYOGFU7ZAPX3HZ3YWZO75AVCNFSM6AAAAABEHXXVG2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZZHA3DANJVGI . You are receiving this because you authored the thread.Message ID: @.***>

lukefromdc commented 4 months ago

I just tested with Adwaita-dark and the standard MATE icons, firefox icon disappeared but no others were affected. We thus have an issue I cannot duplicate. I will check for any oddities in the icon-handling code but I cannot duplicate this so unless I find something obvious I won't be able to work on it.

Note that I have no landline and no VM experience so cannot test other distros.

lukefromdc commented 4 months ago

One more possiblity: are you using a build installed to /usr/local by any chance? If so it might be looking for the icons there.

DMJC commented 4 months ago

For my build I got the debian sources for 1.26, moved the debian folders into 1.28 and built using debuild. I can provide copies of the files.

On Wed, 6 Mar 2024, 12:30 pm Luke from DC, @.***> wrote:

One more possiblity: are you using a build installed to /usr/local by any chance? If so it might be looking for the icons there.

— Reply to this email directly, view it on GitHub https://github.com/mate-desktop/mate-panel/issues/1436#issuecomment-1979941629, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFS2YZR3NFV6DEYQVKSNS3YWZ2CLAVCNFSM6AAAAABEHXXVG2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZZHE2DCNRSHE . You are receiving this because you authored the thread.Message ID: @.***>

lukefromdc commented 4 months ago

I have no idea how Debian's normal build process works, I would not have been able to build at all that way. Probably some kind of error in that process, of which I have no understanding.

Try removing your mate-panel packages, then installing mate-panel simply with make install --prefix=/usr and see if this problem goes away. To remove it run make uninstall and immediately reinstall your mate-panel packages.

DMJC commented 4 months ago

Here is a copy of the entire build log. The GTK3 version is 3.24.41. mate-panel_1.28.0-1_amd64.txt. Apologies for being a pain on this. My understanding of debuild is that it's just automating the autogen/configure/make/packaging stages. From viewing the logs no errors have been thrown, just some warnings about deprecations.

lukefromdc commented 4 months ago

That tells me the build itself went fine. Can you unpack the .deb and tell me where it installed the mate-panel binary to? The only thing I can imagine here is that it's looking for the icons somewhere other than where they are installed.

I won't be able to debug the automated Debian build itself if this is the problem because I have no experience working with it. Never have I been able to build that way from modified source. The build log didn't tell me much, but any clues could be buried in that much text

DMJC commented 4 months ago

on my Debian build the mate-panel executable was installed in /usr/bin/mate-panel libraries in: /usr/lib/x86_64-linux-gnu/mate-panel/ docs in /usr/share/doc/mate-panel applets in /usr/share/mate-panel icons are in /usr/share/icons/name/32x32(etc)/

On Thu, 7 Mar 2024 at 04:46, Luke from DC @.***> wrote:

Just saw this on another issue (in mate-desktop), indicating we may have a more general icon problem in Debian builds or possibly most builds, somehow excluding my own:

mate-desktop/mate-desktop#603 (comment) https://github.com/mate-desktop/mate-desktop/pull/603#issuecomment-1980783220

— Reply to this email directly, view it on GitHub https://github.com/mate-desktop/mate-panel/issues/1436#issuecomment-1981511723, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFS2Y7RALGJSMMHYZL5MRTYW5MPJAVCNFSM6AAAAABEHXXVG2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBRGUYTCNZSGM . You are receiving this because you authored the thread.Message ID: @.***>

lukefromdc commented 4 months ago

That's the same places my mate-panel files install to, and I am out of ideas as I cannot duplicate this. Only thing I can suggest is (as I said before), removing your build packages and testing an install directly from make install using these build options which match my own exactly:

./autogen.sh  --with-in-process-applets=wncklet,clock,fish,notification-area --prefix=/usr libdir=/usr/lib/x86_64-linux-gnu --sysconfdir=/etc --enable-shared=yes --enable-static=no --disable-maintainer-mode

make

sudo make install

If that works, it's something in your Debian build, if not I am out of ideas. What Debian version are you using? I am on unstable with no way to test anything else

lukefromdc commented 4 months ago

I think the more general issue was the failure of two compact menu item icons (Places and System) to appear if a commit that cause a crash for some users was reverted

lukefromdc commented 4 months ago

The window list icons are set in applets/wncklet/wayland-backend.c under wayland, in x11 libwnck sets them so this is completely different code, which BTW predates my own work with MATE on wayland, has been out a while, and I've never seen it fail except in your case.

In the function below we set the real icon name in line 308:


static void
foreign_toplevel_handle_app_id (void *data,
                struct zwlr_foreign_toplevel_handle_v1 *toplevel,
                const char *app_id)
{
    ToplevelTask *task = data;

    gchar *app_id_lower = g_utf8_strdown (app_id, -1);
    gchar *desktop_app_id = g_strdup_printf ("%s.desktop", app_id_lower);
    GDesktopAppInfo *app_info = g_desktop_app_info_new (desktop_app_id);

    if (app_info) {
        GIcon *icon = g_app_info_get_icon (G_APP_INFO (app_info));
        if (icon) {
            gtk_image_set_from_gicon (GTK_IMAGE (task->icon), icon, GTK_ICON_SIZE_MENU);
            goto cleanup;
        }
    }
    gtk_image_set_from_icon_name (GTK_IMAGE (task->icon), app_id_lower, GTK_ICON_SIZE_MENU);

cleanup:
    if (app_info) {
        g_object_unref (G_OBJECT (app_info));
    }
    g_free (app_id_lower);
    g_free (desktop_app_id);
}

If this fails the default icon was set in the code below in line 555, as we set the window button up before filling it with the real icon and window name


static ToplevelTask *
toplevel_task_new (TasklistManager *tasklist, struct zwlr_foreign_toplevel_handle_v1 *toplevel)
{
    ToplevelTask *task = g_new0 (ToplevelTask, 1);
    GtkWidget *button;
    GtkOrientation orient;

    buttons = buttons + 1;
    orient = gtk_orientable_get_orientation (GTK_ORIENTABLE (tasklist->outer_box));
    task->button = gtk_button_new ();
    g_signal_connect (task->button, "clicked", G_CALLBACK (toplevel_task_handle_clicked), task);

    task->icon = gtk_image_new_from_icon_name ("unknown", icon_size);
DMJC commented 4 months ago

I am on debian 13 Trixie. The next release after Bookworm.

DMJC commented 4 months ago

Interesting, whatever it is, manually rebuilding/reinstalling mate-panel didn't fix it. I tried both rebuilding the package and building from the tarball source.

lukefromdc commented 3 months ago

No idea what is different but the icons ALWAYS show up for me. Someone else who can reproduce this may have to work on it.

mark-herbert42 commented 2 weeks ago

Have same story. I do have icons - but all icons look the same, Just common useless icon-icon,not application specific. But it is loaded - and if I change icon theme in control center the icon changes. But it is still same icon for all apps.

lukefromdc commented 2 weeks ago

Not sure what's going on, but I get the full range of application icons in my window list. We need to find out what is different since I am unable to duplicate this

mark-herbert42 commented 2 weeks ago

The strange thing that it was working ok for me too. I am on gentoo - so it is rolling distro and I do have wayfire updated to git snapshot, so I did not notice at which point that happened and icons disappeared. I suggest to wait till wayfire 0.9 which is coming soon and allign again then.

mark-herbert42 commented 1 week ago

Funny things happen. I have been running my laptop for a while, some suspens-hibernates, many apps opened and closed. And - opening app and get icon painted well. Actually - new firefox window with alternative profile. And one of the libreoffice documents - icon is OK, The rest icons - crap. So the current code is capable of retrieving the icons but somehow it does not always do it.

The other point I noticed - battery charge monitor. This thing refresh data in a very strange way. It can do it OK - or hang for a couple of hours showing the same %. When you open a properties dialog - it force-triggers refresh. So something is not OK in the panel internals , but in a very difficult way.

lukefromdc commented 1 week ago

I'm wondering if the difference is an older version of some underlying library such as GTK3 or glib or even an older compositor version, note that I am on Debian Unstable with locally built GTK3 and Glib usually pretty recent