summaryrefslogtreecommitdiff
path: root/src/w32console.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2013-09-18 11:26:03 +0300
committerEli Zaretskii <eliz@gnu.org>2013-09-18 11:26:03 +0300
commit28a16449218739dc41387b71233e9f9c0d62ceb9 (patch)
treee2fe0cf02a1be92e8a0444a30876bfdc3bed0131 /src/w32console.c
parentf1303b5259c58809845b1f223b34567786afbac4 (diff)
downloademacs-28a16449218739dc41387b71233e9f9c0d62ceb9.tar.gz
Turn off text cursor when dropping down menus.
Diffstat (limited to 'src/w32console.c')
-rw-r--r--src/w32console.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/w32console.c b/src/w32console.c
index cb42bae1421..94bb5df07a4 100644
--- a/src/w32console.c
+++ b/src/w32console.c
@@ -62,6 +62,7 @@ static HANDLE prev_screen, cur_screen;
static WORD char_attr_normal;
static DWORD prev_console_mode;
+static CONSOLE_CURSOR_INFO console_cursor_info;
#ifndef USE_SEPARATE_SCREEN
static CONSOLE_CURSOR_INFO prev_console_cursor;
#endif
@@ -95,6 +96,22 @@ w32con_move_cursor (struct frame *f, int row, int col)
SetConsoleCursorPosition (cur_screen, cursor_coords);
}
+void
+w32con_hide_cursor (void)
+{
+ GetConsoleCursorInfo (cur_screen, &console_cursor_info);
+ console_cursor_info.bVisible = FALSE;
+ SetConsoleCursorInfo (cur_screen, &console_cursor_info);
+}
+
+void
+w32con_show_cursor (void)
+{
+ GetConsoleCursorInfo (cur_screen, &console_cursor_info);
+ console_cursor_info.bVisible = TRUE;
+ SetConsoleCursorInfo (cur_screen, &console_cursor_info);
+}
+
/* Clear from cursor to end of screen. */
static void
w32con_clear_to_end (struct frame *f)