From 36dd15a24450d32dda8d15b38a5fac925224e9e9 Mon Sep 17 00:00:00 2001 From: Lobo Torres Date: Wed, 28 Aug 2024 11:47:14 -0400 Subject: [PATCH] (uxn11) Add WM_CLASS hint to application window This allows for programs like `xprop` and window managers to recognize Uxn11 windows. --- src/uxn11.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/uxn11.c b/src/uxn11.c index dbb7643..318a87d 100644 --- a/src/uxn11.c +++ b/src/uxn11.c @@ -200,6 +200,7 @@ display_init(void) char empty[] = {0}; Pixmap bitmap; Cursor blank; + XClassHint class = { "uxn11", "Uxn" }; display = XOpenDisplay(NULL); if(!display) return system_error("init", "Display failed"); @@ -213,6 +214,7 @@ display_init(void) wmDelete = XInternAtom(display, "WM_DELETE_WINDOW", True); XSetWMProtocols(display, window, &wmDelete, 1); XStoreName(display, window, boot_rom); + XSetClassHint(display, window, &class); XMapWindow(display, window); ximage = XCreateImage(display, visual, DefaultDepth(display, DefaultScreen(display)), ZPixmap, 0, (char *)uxn_screen.pixels, uxn_screen.width, uxn_screen.height, 32, 0); /* hide cursor */