diff options
| author | Eli Zaretskii | 2013-09-24 21:40:58 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2013-09-24 21:40:58 +0300 |
| commit | aa36c6d0c478a756cc0a9aca796cbf431be773ee (patch) | |
| tree | 5ec6f1130d0e3f739cbd7108efd382e51657689f /src | |
| parent | f34729eaec648d9784e68cf407b3ca94b19e3b70 (diff) | |
| download | emacs-aa36c6d0c478a756cc0a9aca796cbf431be773ee.tar.gz emacs-aa36c6d0c478a756cc0a9aca796cbf431be773ee.zip | |
Fix crash in GUI mode and enable TTY mouse on Windows.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 16 | ||||
| -rw-r--r-- | src/term.c | 4 |
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, | |||
| 3905 | else | 3905 | else |
| 3906 | { | 3906 | { |
| 3907 | bool do_display = true; | 3907 | bool do_display = true; |
| 3908 | struct tty_display_info *tty = CURTTY (); | ||
| 3909 | 3908 | ||
| 3910 | /* When this TTY is displaying a menu, we must prevent any | 3909 | if (FRAME_TERMCAP_P (SELECTED_FRAME ())) |
| 3911 | redisplay, because we modify the frame's glyph matrix | 3910 | { |
| 3912 | behind the back of the display engine. */ | 3911 | struct tty_display_info *tty = CURTTY (); |
| 3913 | if (tty->showing_menu) | 3912 | |
| 3914 | do_display = false; | 3913 | /* When this TTY is displaying a menu, we must prevent |
| 3914 | any redisplay, because we modify the frame's glyph | ||
| 3915 | matrix behind the back of the display engine. */ | ||
| 3916 | if (tty->showing_menu) | ||
| 3917 | do_display = false; | ||
| 3918 | } | ||
| 3915 | 3919 | ||
| 3916 | wait_reading_process_output (0, 0, -1, do_display, Qnil, NULL, 0); | 3920 | wait_reading_process_output (0, 0, -1, do_display, Qnil, NULL, 0); |
| 3917 | } | 3921 | } |
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, | |||
| 2922 | int i, face, width, mx = -1, my = -1, enabled, mousehere, row, col; | 2922 | int i, face, width, mx = -1, my = -1, enabled, mousehere, row, col; |
| 2923 | struct frame *sf = SELECTED_FRAME (); | 2923 | struct frame *sf = SELECTED_FRAME (); |
| 2924 | struct tty_display_info *tty = FRAME_TTY (sf); | 2924 | struct tty_display_info *tty = FRAME_TTY (sf); |
| 2925 | #if defined (HAVE_MOUSE) || defined (HAVE_GPM) | 2925 | #if defined (WINDOWSNT) || defined (HAVE_GPM) |
| 2926 | Lisp_Object lmx, lmy, lisp_dummy; | 2926 | Lisp_Object lmx, lmy, lisp_dummy; |
| 2927 | enum scroll_bar_part part_dummy; | 2927 | enum scroll_bar_part part_dummy; |
| 2928 | Time time_dummy; | 2928 | Time time_dummy; |
| 2929 | 2929 | ||
| 2930 | if (FRAME_TERMINAL (sf)->mouse_position_hook) | 2930 | if (FRAME_TERMINAL (sf)->mouse_position_hook) |
| 2931 | (*FRAME_TERMINAL (sf)->mouse_position_hook) (&sf, -1, | 2931 | (*FRAME_TERMINAL (sf)->mouse_position_hook) (&sf, -1, |
| 2932 | &lispy_dummy, &party_dummy, | 2932 | &lisp_dummy, &part_dummy, |
| 2933 | &lmx, &lmy, | 2933 | &lmx, &lmy, |
| 2934 | &time_dummy); | 2934 | &time_dummy); |
| 2935 | if (!NILP (lmx)) | 2935 | if (!NILP (lmx)) |