Last active
August 29, 2015 14:17
-
-
Save woodruffw/c79844f97542a70f41f6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* name_window | |
| Name the given window "name" on the given display. | |
| Arguments: | |
| Display *disp - a pointer to the X display | |
| Window wind - the window being named | |
| const char *name - the name being given to the window | |
| */ | |
| void name_window(Display *disp, Window wind, const char *name) | |
| { | |
| XTextProperty name_prop; | |
| name_prop.value = (unsigned char *) name; | |
| name_prop.encoding = XA_STRING; /* found in X11/Xatom.h */ | |
| name_prop.format = 8; /* our format is 8 bits, ASCII encoded */ | |
| name_prop.nitems = strlen(name); /* specify the number of characters in name */ | |
| XSetWMName(disp, wind, &name_prop); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment