diff --git a/src/screen_utils.c b/src/screen_utils.c
index ff16613e42952b5ba1a4e393054d3c3b03a111a4..891b9b3cb61bac1f673d1d45908712839d84f09d 100644 (file)
--- a/src/screen_utils.c
+++ b/src/screen_utils.c
flash();
}
+static bool
+ignore_key(int key)
+{
+ return key == ERR;
+}
+
int
screen_getch(const char *prompt)
{
curs_set(1);
int key;
- while ((key = wgetch(w)) == ERR)
- ;
+ while (ignore_key(key = wgetch(w))) {}
#ifdef HAVE_GETMOUSE
/* ignore mouse events */
wrefresh(w);
colors_use(w, COLOR_LIST);
}
-
-#ifndef NCMPC_MINI
-void
-set_xterm_title(const char *format, ...)
-{
- /* 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")) {
- va_list ap;
- va_start(ap,format);
- char *msg = g_strdup_vprintf(format,ap);
- va_end(ap);
- printf("\033]0;%s\033\\", msg);
- fflush(stdout);
- g_free(msg);
- } else
- options.enable_xterm_title = FALSE;
- }
-}
-#endif