Re: [hackers] [dmenu] [PATCH] Set class name on menu window

From: Devin J. Pohly <>
Date: Fri, 3 Nov 2017 07:35:59 -0500

On Thu, Nov 02, 2017 at 10:03:19PM -0700, Omar Sandoval wrote:
> On Fri, Nov 03, 2017 at 12:15:55AM +0100, Hiltjo Posthuma wrote:
> >
> > Then it should be changed/fixed in (your local) compton. Then all applications
> > can benefit and all the applications don't need to be patched.
> >
> > There are too many _NET_WM_CRAP already.
> It's not a matter of changing compton. There's just no way to identify
> dmenu windows because dmenu doesn't set any window properties. WM_CLASS
> is a standard ICCCM property that almost every X application sets
> (including st). _NET_WM_PID is a red herring; I just pointed it out
> because it _could_ be used to find the process name like you suggested,
> but dmenu doesn't set it and WM_CLASS is the normal way to do it
> anyways.

I'm inclined to agree with Omar here - WM_CLASS is a venerable X
standard, not late-coming cruft from the _NET_WM crowd. I remember
having been surprised that dmenu didn't set it.

Other suckless and suckless-like programs set this hint (st, tabbed,
sent, dzen2) and process it (dwm).

If it makes things better, this could be reduced to two lines:

    XClassHints ch = {"dmenu", "dmenu"};
    XSetClassHint(dpy, win, &ch);


Received on Fri Nov 03 2017 - 13:35:59 CET

This archive was generated by hypermail 2.3.0 : Fri Nov 03 2017 - 13:48:21 CET