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
328328 /*
329329 * set up property as required by ICCCM
330330 */
331− name.value = (uchar*)"drawterm";
331+ if((name.value = getenv("WM_NAME")) == nil)
332+ name.value = (uchar*)"drawterm";
332333 name.encoding = XA_STRING;
333334 name.format = 8;
334335 name.nitems = strlen((char*)name.value);
@@ -341,7 +342,8 @@ screeninit(void) · 6 unmodified lines
341342 hints.icon_pixmap = icon_pixmap;
342343
343344 classhints.res_name = "drawterm";
344− classhints.res_class = "Drawterm";
345+ if((classhints.res_class = getenv("WM_CLASS")) == nil)
346+ classhints.res_class = "Drawterm";
345347 argv[0] = "drawterm";
346348 argv[1] = nil;
347349 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