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

From: Omar Sandoval <osandov_AT_osandov.com>
Date: Fri, 3 Nov 2017 13:25:49 -0700

On Fri, Nov 03, 2017 at 08:44:14PM +0100, Hiltjo Posthuma wrote:
> On Fri, Nov 03, 2017 at 09:49:10AM -0700, Omar Sandoval wrote:
> > WM_CLASS is a standard ICCCM property which is used to identify windows.
> > Window managers and compositors use it to allow per-application
> > configurable behavior.
> > ---
> > Thanks, Devin, that's much cleaner.
> >
> > dmenu.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/dmenu.c b/dmenu.c
> > index d605ab4..85e5060 100644
> > --- a/dmenu.c
> > +++ b/dmenu.c
> > _AT_@ -545,6 +545,7 @@ setup(void)
> > XIM xim;
> > Window w, dw, *dws;
> > XWindowAttributes wa;
> > + XClassHint ch = {"dmenu", "dmenu"};
> > #ifdef XINERAMA
> > XineramaScreenInfo *info;
> > Window pw;
> > _AT_@ -613,6 +614,7 @@ setup(void)
> > win = XCreateWindow(dpy, parentwin, x, y, mw, mh, 0,
> > CopyFromParent, CopyFromParent, CopyFromParent,
> > CWOverrideRedirect | CWBackPixel | CWEventMask, &swa);
> > + XSetClassHint(dpy, win, &ch);
> >
> > /* open input methods */
> > xim = XOpenIM(dpy, NULL, NULL, NULL);
> > --
> > 2.15.0
> >
> >
>
> Awesome! Applied.
>
> Thanks Omar and Devin!

Thanks, Hiltjo, I appreciate it!
Received on Fri Nov 03 2017 - 21:25:49 CET

This archive was generated by hypermail 2.3.0 : Fri Nov 03 2017 - 21:36:19 CET