History

get the WM_NAME and WM_CLASS from the environment

joe committed 6 years ago

Commit bf3a3cd1 parent 07155bd1 file · +4 −2Browse files

Unified · Split

gui-x11/x11.c+4−2
@@ -328,7 +328,8 @@ screeninit(void) · 327 unmodified lines
328 /*328 /*
329 * set up property as required by ICCCM329 * set up property as required by ICCCM
330 */330 */
331 name.value = (uchar*)"drawterm";331 if((name.value = getenv("WM_NAME")) == nil)
332 name.value = (uchar*)"drawterm";
332 name.encoding = XA_STRING;333 name.encoding = XA_STRING;
333 name.format = 8;334 name.format = 8;
334 name.nitems = strlen((char*)name.value);335 name.nitems = strlen((char*)name.value);
@@ -341,7 +342,8 @@ screeninit(void) · 6 unmodified lines
341 hints.icon_pixmap = icon_pixmap;342 hints.icon_pixmap = icon_pixmap;
342 343
343 classhints.res_name = "drawterm";344 classhints.res_name = "drawterm";
344 classhints.res_class = "Drawterm";345 if((classhints.res_class = getenv("WM_CLASS")) == nil)
346 classhints.res_class = "Drawterm";
345 argv[0] = "drawterm";347 argv[0] = "drawterm";
346 argv[1] = nil;348 argv[1] = nil;
347 XSetWMProperties(xdisplay, xdrawable,349 XSetWMProperties(xdisplay, xdrawable,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t