Skip to content

Fallback icon doesn't play nice with third-party panels #21

@ahigerd

Description

@ahigerd

In openbox/client.c:client_update_icons(), if a window doesn't have an icon explicitly set and it doesn't have any parents to inherit an icon from, Openbox sets one:

        OBT_PROP_SETA32(self->window, NET_WM_ICON, CARDINAL, ldata, w*h+2);

I'm not entirely sure why this is necessary: client_startup initializes each client's icon to def_win_icon, so everything in Openbox itself will have something to render.

By contrast, if a window doesn't have an icon set on it, some other environments (I know GNOME in particular) can pull an icon out of the system theme. I haven't looked into exactly how GNOME does it, but in the panel I'm building I'm checking the WM_CLASS property to see if there's something matching in /usr/share/pixmaps or /usr/share/icons. Unfortunately, because Openbox is setting the _NET_WM_ICON for the window, nothing else will ever get the chance to notice that the icon is missing in order to supply one. (In particular, Slack doesn't set an icon for itself. Because it's not open-source, I can't fix it upstream.)

Experimentally removing the icon assignment doesn't appear to have any negative consequences.

Would you be willing to consider removing the icon-setting behavior? Is there anything that depends on that behavior?

If removing it isn't acceptable, could we discuss setting another property on the window to indicate that Openbox has overridden the icon? That wouldn't make third-party tools automatically work but at least it would make it possible to build Openbox compatibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions