aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNRK <nrk@disroot.org>2021-12-27 14:32:44 +0600
committerN-R-K <79544946+N-R-K@users.noreply.github.com>2022-01-06 17:53:02 +0000
commit8cc5cee08f74f0681739b48c11611043009a6d5a (patch)
tree79f869241329cc4bbf721eda6ec1197d346c1e37
parent80ada33c66045b1e9cff70864000b35e4c3c93ec (diff)
fix -Wwrite-strings related warnings
-rw-r--r--window.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/window.c b/window.c
index 8b45501..88d9d07 100644
--- a/window.c
+++ b/window.c
@@ -186,6 +186,8 @@ void win_open(win_t *win)
pid_t pid;
char hostname[256];
XSetWindowAttributes attrs;
+ char res_class[] = RES_CLASS;
+ char res_name[] = "nsxiv";
e = &win->env;
parent = options->embed ? options->embed : RootWindow(e->dpy, e->scr);
@@ -284,11 +286,11 @@ void win_open(win_t *win)
free(icon_data);
/* These two atoms won't change and thus only need to be set once. */
- XStoreName(win->env.dpy, win->xwin, "nsxiv");
- XSetIconName(win->env.dpy, win->xwin, "nsxiv");
+ XStoreName(win->env.dpy, win->xwin, res_name);
+ XSetIconName(win->env.dpy, win->xwin, res_name);
- classhint.res_class = RES_CLASS;
- classhint.res_name = options->res_name != NULL ? options->res_name : "nsxiv";
+ classhint.res_class = res_class;
+ classhint.res_name = options->res_name != NULL ? options->res_name : res_name;
XSetClassHint(e->dpy, win->xwin, &classhint);
XSetWMProtocols(e->dpy, win->xwin, &atoms[ATOM_WM_DELETE_WINDOW], 1);