summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2013-09-24 21:40:58 +0300
committerEli Zaretskii <eliz@gnu.org>2013-09-24 21:40:58 +0300
commitaa36c6d0c478a756cc0a9aca796cbf431be773ee (patch)
tree5ec6f1130d0e3f739cbd7108efd382e51657689f /src
parentf34729eaec648d9784e68cf407b3ca94b19e3b70 (diff)
downloademacs-aa36c6d0c478a756cc0a9aca796cbf431be773ee.tar.gz
Fix crash in GUI mode and enable TTY mouse on Windows.
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c16
-rw-r--r--src/term.c4
2 files changed, 12 insertions, 8 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 9faa3770cf3..fad04920e2e 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -3905,13 +3905,17 @@ kbd_buffer_get_event (KBOARD **kbp,
else
{
bool do_display = true;
- struct tty_display_info *tty = CURTTY ();
- /* When this TTY is displaying a menu, we must prevent any
- redisplay, because we modify the frame's glyph matrix
- behind the back of the display engine. */
- if (tty->showing_menu)
- do_display = false;
+ if (FRAME_TERMCAP_P (SELECTED_FRAME ()))
+ {
+ struct tty_display_info *tty = CURTTY ();
+
+ /* When this TTY is displaying a menu, we must prevent
+ any redisplay, because we modify the frame's glyph
+ matrix behind the back of the display engine. */
+ if (tty->showing_menu)
+ do_display = false;
+ }
wait_reading_process_output (0, 0, -1, do_display, Qnil, NULL, 0);
}
diff --git a/src/term.c b/src/term.c
index b408a4a0907..00ef53d5c94 100644
--- a/src/term.c
+++ b/src/term.c
@@ -2922,14 +2922,14 @@ tty_menu_display (tty_menu *menu, int x, int y, int pn, int *faces,
int i, face, width, mx = -1, my = -1, enabled, mousehere, row, col;
struct frame *sf = SELECTED_FRAME ();
struct tty_display_info *tty = FRAME_TTY (sf);
-#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
+#if defined (WINDOWSNT) || defined (HAVE_GPM)
Lisp_Object lmx, lmy, lisp_dummy;
enum scroll_bar_part part_dummy;
Time time_dummy;
if (FRAME_TERMINAL (sf)->mouse_position_hook)
(*FRAME_TERMINAL (sf)->mouse_position_hook) (&sf, -1,
- &lispy_dummy, &party_dummy,
+ &lisp_dummy, &part_dummy,
&lmx, &lmy,
&time_dummy);
if (!NILP (lmx))