summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2fb89f6)
raw | patch | inline | side by side (parent: 2fb89f6)
author | Max Kellermann <max.kellermann@gmail.com> | |
Mon, 20 Mar 2017 16:06:47 +0000 (17:06 +0100) | ||
committer | Max Kellermann <max.kellermann@gmail.com> | |
Mon, 20 Mar 2017 16:06:47 +0000 (17:06 +0100) |
src/xterm_title.c | patch | blob | history |
diff --git a/src/xterm_title.c b/src/xterm_title.c
index 0e993cf3b2d022f163103b787c2c4843f9d15e3f..248cfa8c5d6a0f7291309e854eedd7c5dd936b29 100644 (file)
--- a/src/xterm_title.c
+++ b/src/xterm_title.c
/* the current xterm title exists under the WM_NAME property */
/* and can be retrieved with xprop -id $WINDOWID */
- if (options.enable_xterm_title) {
- if (g_getenv("WINDOWID")) {
- printf("\033]0;%s\033\\", title);
- fflush(stdout);
- } else
- options.enable_xterm_title = FALSE;
+ if (!options.enable_xterm_title)
+ return;
+
+ if (g_getenv("WINDOWID") == NULL) {
+ options.enable_xterm_title = FALSE;
+ return;
}
+
+ printf("\033]0;%s\033\\", title);
+ fflush(stdout);
}