nsxiv8cc5cee
fix -Wwrite-strings related warnings
+6 −4
1 file changed
- M window.c +6 −4
| @@ -186,6 +186,8 @@ void win_open(win_t *win) | |||
| 186 | 186 | pid_t pid; | |
| 187 | 187 | char hostname[256]; | |
| 188 | 188 | XSetWindowAttributes attrs; | |
| 189 | + | char res_class[] = RES_CLASS; | |
| 190 | + | char res_name[] = "nsxiv"; | |
| 189 | 191 | ||
| 190 | 192 | e = &win->env; | |
| 191 | 193 | parent = options->embed ? options->embed : RootWindow(e->dpy, e->scr); | |
| @@ -284,11 +286,11 @@ void win_open(win_t *win) | |||
| 284 | 286 | free(icon_data); | |
| 285 | 287 | ||
| 286 | 288 | /* These two atoms won't change and thus only need to be set once. */ | |
| 287 | − | XStoreName(win->env.dpy, win->xwin, "nsxiv"); | |
| 288 | − | XSetIconName(win->env.dpy, win->xwin, "nsxiv"); | |
| 289 | + | XStoreName(win->env.dpy, win->xwin, res_name); | |
| 290 | + | XSetIconName(win->env.dpy, win->xwin, res_name); | |
| 289 | 291 | ||
| 290 | − | classhint.res_class = RES_CLASS; | |
| 291 | − | classhint.res_name = options->res_name != NULL ? options->res_name : "nsxiv"; | |
| 292 | + | classhint.res_class = res_class; | |
| 293 | + | classhint.res_name = options->res_name != NULL ? options->res_name : res_name; | |
| 292 | 294 | XSetClassHint(e->dpy, win->xwin, &classhint); | |
| 293 | 295 | ||
| 294 | 296 | XSetWMProtocols(e->dpy, win->xwin, &atoms[ATOM_WM_DELETE_WINDOW], 1); | |