Setting the MiniIcon from the window's Icon

Hi All,

So it’s been about two weeks now since I switched to Fvwm. I love it so far. I find one thing extreemly strange though: It apears that you have to manually configure the miniicon for most windows.

From what I understand, if the application has a EWMH about a MiniIcon, then fvwm can use this as the miniicon. If the application does not have this EWMH, then tough. You get no MiniIcon, unless you manually configure one using the Style command.

The reason I find this unusual is because a lot of applications (like xdvi for instance) have a EWM hint about an Icon, but no hint about a miniIcon. Wouldn’t it be natural if Fvwm used this icon (maybe resized) as the applications MiniIcon if a miniicon is not provided?

Do you know if this can be done somehow? If I knew some X programing, I could probably use FvwmEvent and a cleverly written C program to accomplish the above. But is there an easier way … :slight_smile:

Thanks in advance,


That’s right – the logic behind adding to a Style option was so that it could be applied to a specific window.

Afraid not – the EWMH icons are specific to a window as it is running, and not determinable at run-time.

– Thomas Adam

Hello again Thomas. Looks like you’ve all the answers to my questions. Maybe in a few hundered years I’ll be able to answer one of yours :slight_smile:

Maybe I dont’ understand this fully though. I’m OK with the fact that EWMH icons are changed dynamically etc. I notice that when I have NO styles whatsoever defined, and I ask to Iconify a window (say xdvi), then the window get’s iconified with a Nifty xdvi Icon. Does the application create (or specify) this icon only when it recieves the “Iconify” request? If yes, all hope is lost. If no, maybe we can do something about it?

For instance, when I run xdvi in openbox (where I recently switched from), openbox is aware of the applications Icon (and shows me the icon when I alt-tab, which is really where it is most hepfull). I think it’s because (and correct me if I’m wrong) openbox is a NETWM, and fwvm is an EWM, and maybe xdvi has a NETWM icon hint, but not an EWM icon hint? Now xprop shows that xdvi has

WM_HINTS(WM_HINTS): Client accepts input or input focus: True Initial state is Normal State. bitmap id # to use for icon: 0x1400001
Now if I could understand what this, then I’d konw how to get the Icon for xdvi! I could ofcourse read the openbox source and see how it gets the application icon, and try porting part of it to fvwm? But I’m an X programmer n00b :frowning: and was hopign to get my “thesis” done instead … :slight_smile:

If you think I should be posting this on the dev list instead of cluttering up the forrum, let me know :slight_smile:



Maybe. :slight_smile: At the moment, I rarely post questions, I just post many answers, but I like it that way. :slight_smile:

I’m not sure – it shouldn’t be application dependant. The icon is always there – but only shows (usually) when iconified.

Use xprop again – and look for _NET_WM_ICON – this ought to (IIRC) hold an array of ARGB values that define the icon.
This is an array of 32bit packed CARDINAL ARGB with high byte being A, low byte being B. The first two cardinals are width, height. Data is in rows, left to right and top to bottom.

– Thomas Adam

Thanks a ton. Always good to have a friendly helpfull linux guru. Well, atleast the UGH claims that’s the only way to understand Unix … :slight_smile:

That was the first thing I looked for. None. The full output of xprop is

_KDE_NET_WM_FRAME_STRUT(CARDINAL) = 1, 1, 19, 3 _NET_WM_STATE(ATOM) = WM_STATE(WM_STATE): window state: Normal icon window: 0x0 _NET_WM_VISIBLE_ICON_NAME(UTF8_STRING) = 0x6d, 0x69, 0x64, 0x74, 0x65, 0x72, 0x6d, 0x31 _NET_WM_VISIBLE_NAME(UTF8_STRING) = 0x58, 0x64, 0x76, 0x69, 0x3a, 0x20, 0x20, 0x6d, 0x69, 0x64, 0x74, 0x65, 0x72, 0x6d, 0x31 _NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_SHADE, _NET_WM_ACTION_CLOSE, _NET_WM_ACTION_MOVE, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_FULLSCREEN, _NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_MAXIMIZE_VERT _NET_WM_DESKTOP(CARDINAL) = 1 WM_CLIENT_LEADER(WINDOW): window id # 0x1600035 WM_LOCALE_NAME(STRING) = "C" WM_CLASS(STRING) = "xdvi", "XDvi" WM_HINTS(WM_HINTS): Client accepts input or input focus: True Initial state is Normal State. bitmap id # to use for icon: 0x1600001 WM_NORMAL_HINTS(WM_SIZE_HINTS): user specified location: 0, 0 user specified size: 1148 by 800 window gravity: NorthWest WM_CLIENT_MACHINE(STRING) = "" WM_COMMAND(STRING) = { "xdvi.bin.orig", "-name", "xdvi", "teaching/midterm1.dvi" } WM_ICON_NAME(STRING) = "midterm1" WM_NAME(STRING) = "Xdvi: midterm1"

I started reading a little about the EWMH specification online, and grepping the openbox source code when your message arrived. No luck :frowning:. Maybe in a few years I’ll know this junk and write something to fix it.

It looks like this would be a usefull thing to have, so I’m not sure why the fvwm devs did not impliment it by default anyway :question:

Thanks for your help,


Maybe I just started with a bad example (xdvi). I was reading the ICCCM guide, which said

Maybe other applications have a nice WM_ICON_PIXMAP Xatom, and I can write a nifty program to swipe it, and set that as the MiniIcon?


It varies greatly from person to person, of course as to how one learns. Even the “gurus” (an attribution I have always disagreed with) learn… :slight_smile:

But EWMH’s are implemented – but only for those applications which support them (so things like GNOME and KDE apps). Xdvi (as an example) doesn’t support EWMH and hence doesn’t have a miniicon associated with it in that way. But what it will have is the Xatom which specifies the Icon ID – something which is irrelevant here, I’m sorry to say. Xdvi gets it’s icon in one of the standard locations in /usr/share/icons, or somesuch.

You’re most welcome.

– Thomas Adam

It doesn’t work like that, I’m afraid. For miniicons to work, the application itself has to understand them (to set the Xatom in the first place). I doubt very much that you can use xprop to -set the desired Xatom.

– Thomas Adam

Yep, that’s true. Most reasonable applications (like atleast the gnome / kde ones) set the icon and miniicon corretcly. And the Icon ID is possibly irrelevent here, however a google search turned up the following:

I guess that some applications following the above specification will put the icon pixmap in the WM_HINTS Xatom, and that could possibly be where xdvi and others put the icon. (I searched the entire installed latex package files for the xdvi icon file, and never found one!). If applications put the icon here, there might be hope.

Now as you point out, I probably won’t be able to use xset to do anything about the miniicon. However I defenately can use FvwmCommand :slight_smile:. I’ll play around a little, and revive my C skills. If nothing else I’ll post back and say “you were right, and there’s nothing i can do about the MiniIcon”. I’m hoping otherwise though … :slight_smile:

Thanks yet again,