(uxn11) Add WM_CLASS hint to application window

This allows for programs like `xprop` and window managers to
recognize Uxn11 windows.
This commit is contained in:
Lobo Torres 2024-08-28 11:47:14 -04:00 committed by Devine Lu Linvega
parent 67b06c35a4
commit 36dd15a244
1 changed files with 2 additions and 0 deletions

View File

@ -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 */