(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:
parent
67b06c35a4
commit
36dd15a244
|
@ -200,6 +200,7 @@ display_init(void)
|
||||||
char empty[] = {0};
|
char empty[] = {0};
|
||||||
Pixmap bitmap;
|
Pixmap bitmap;
|
||||||
Cursor blank;
|
Cursor blank;
|
||||||
|
XClassHint class = { "uxn11", "Uxn" };
|
||||||
display = XOpenDisplay(NULL);
|
display = XOpenDisplay(NULL);
|
||||||
if(!display)
|
if(!display)
|
||||||
return system_error("init", "Display failed");
|
return system_error("init", "Display failed");
|
||||||
|
@ -213,6 +214,7 @@ display_init(void)
|
||||||
wmDelete = XInternAtom(display, "WM_DELETE_WINDOW", True);
|
wmDelete = XInternAtom(display, "WM_DELETE_WINDOW", True);
|
||||||
XSetWMProtocols(display, window, &wmDelete, 1);
|
XSetWMProtocols(display, window, &wmDelete, 1);
|
||||||
XStoreName(display, window, boot_rom);
|
XStoreName(display, window, boot_rom);
|
||||||
|
XSetClassHint(display, window, &class);
|
||||||
XMapWindow(display, window);
|
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);
|
ximage = XCreateImage(display, visual, DefaultDepth(display, DefaultScreen(display)), ZPixmap, 0, (char *)uxn_screen.pixels, uxn_screen.width, uxn_screen.height, 32, 0);
|
||||||
/* hide cursor */
|
/* hide cursor */
|
||||||
|
|
Loading…
Reference in New Issue