Set class name on menu window 64ab2801
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.
Omar Sandoval · 2017-11-03 09:49 1 file(s) · +2 −0
dmenu.c +2 −0
545 545
	XIM xim;
546 546
	Window w, dw, *dws;
547 547
	XWindowAttributes wa;
548 +
	XClassHint ch = {"dmenu", "dmenu"};
548 549
#ifdef XINERAMA
549 550
	XineramaScreenInfo *info;
550 551
	Window pw;
613 614
	win = XCreateWindow(dpy, parentwin, x, y, mw, mh, 0,
614 615
	                    CopyFromParent, CopyFromParent, CopyFromParent,
615 616
	                    CWOverrideRedirect | CWBackPixel | CWEventMask, &swa);
617 +
	XSetClassHint(dpy, win, &ch);
616 618
617 619
	/* open input methods */
618 620
	xim = XOpenIM(dpy, NULL, NULL, NULL);