summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aef88fd)
raw | patch | inline | side by side (parent: aef88fd)
author | Max Kellermann <max.kellermann@gmail.com> | |
Mon, 20 Mar 2017 16:17:36 +0000 (17:17 +0100) | ||
committer | Max Kellermann <max.kellermann@gmail.com> | |
Mon, 20 Mar 2017 16:17:48 +0000 (17:17 +0100) |
src/screen_utils.c | patch | blob | history |
diff --git a/src/screen_utils.c b/src/screen_utils.c
index 891b9b3cb61bac1f673d1d45908712839d84f09d..8f69930d64126752b048164fcd1a8d7e9d0df379 100644 (file)
--- a/src/screen_utils.c
+++ b/src/screen_utils.c
static bool
ignore_key(int key)
{
- return key == ERR;
+ return
+#ifdef HAVE_GETMOUSE
+ /* ignore mouse events */
+ key == KEY_MOUSE ||
+#endif
+ key == ERR;
}
int
int key;
while (ignore_key(key = wgetch(w))) {}
-#ifdef HAVE_GETMOUSE
- /* ignore mouse events */
- if (key == KEY_MOUSE)
- return screen_getch(prompt);
-#endif
-
noecho();
curs_set(0);