1 /* Input event support for Emacs on the Microsoft Windows API.
2 Copyright (C) 1992-1993, 1995, 2001-2016 Free Software Foundation,
5 This file is part of GNU Emacs.
7 GNU Emacs is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or (at
10 your option) any later version.
12 GNU Emacs is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
22 Adapted from ntkbd.c by Tim Fleehart
33 #ifndef MOUSE_HWHEELED
34 #define MOUSE_HWHEELED 8
40 #include "blockinput.h"
41 #include "termchar.h" /* for Mouse_HLInfo, tty_display_info */
44 #include "w32common.h"
46 /* stdin, from w32console.c */
47 extern HANDLE keyboard_handle
;
49 /* Info for last mouse motion */
50 static COORD movement_pos
;
51 static Time movement_time
;
54 extern unsigned int map_keypad_keys (unsigned int, unsigned int);
55 extern unsigned int w32_key_to_modifier (int key
);
58 #define EVENT_QUEUE_SIZE 50
59 static INPUT_RECORD event_queue
[EVENT_QUEUE_SIZE
];
60 static INPUT_RECORD
*queue_ptr
= event_queue
, *queue_end
= event_queue
;
62 /* Temporarily store lead byte of DBCS input sequences. */
63 static char dbcs_lead
= 0;
66 w32_read_console_input (HANDLE h
, INPUT_RECORD
*rec
, DWORD recsize
,
69 return (w32_console_unicode_input
70 ? ReadConsoleInputW (h
, rec
, recsize
, waiting
)
71 : ReadConsoleInputA (h
, rec
, recsize
, waiting
));
74 /* Set by w32_console_toggle_lock_key. */
78 fill_queue (BOOL block
)
83 if (queue_ptr
< queue_end
)
84 return queue_end
-queue_ptr
;
88 /* Check to see if there are some events to read before we try
89 because we can't block. */
90 if (!GetNumberOfConsoleInputEvents (keyboard_handle
, &events_waiting
))
92 if (events_waiting
== 0)
96 rc
= w32_read_console_input (keyboard_handle
, event_queue
, EVENT_QUEUE_SIZE
,
100 queue_ptr
= event_queue
;
101 queue_end
= event_queue
+ events_waiting
;
102 return (int) events_waiting
;
105 /* In a generic, multi-frame world this should take a console handle
106 and return the frame for it.
108 Right now, there's only one frame so return it. */
109 static struct frame
*
112 return SELECTED_FRAME ();
115 /* Translate console modifiers to emacs modifiers.
116 German keyboard support (Kai Morgan Zeise 2/18/95). */
120 /* Return nonzero if the virtual key is a dead key. */
122 is_dead_key (int wparam
)
124 unsigned int code
= MapVirtualKey (wparam
, 2);
126 /* Windows 95 returns 0x8000, NT returns 0x80000000. */
127 return (code
& 0x80008000) ? 1 : 0;
131 /* The return code indicates key code size. cpID is the codepage to
132 use for translation to Unicode; -1 means use the current console
136 /* return code -1 means that event_queue_ptr won't be incremented.
137 In other word, this event makes two key codes. (by himi) */
139 key_event (KEY_EVENT_RECORD
*event
, struct input_event
*emacs_ev
, int *isdead
)
141 static int mod_key_state
= 0;
146 /* Skip key-up events. */
147 if (!event
->bKeyDown
)
149 switch (event
->wVirtualKeyCode
)
152 if (!w32_kbdhook_active
)
153 mod_key_state
&= ~LEFT_WIN_PRESSED
;
156 if (!w32_kbdhook_active
)
157 mod_key_state
&= ~RIGHT_WIN_PRESSED
;
160 mod_key_state
&= ~APPS_PRESSED
;
166 /* Ignore keystrokes we fake ourself; see below. */
167 if (faked_key
== event
->wVirtualKeyCode
)
173 /* To make it easier to debug this code, ignore modifier keys! */
174 switch (event
->wVirtualKeyCode
)
177 if (NILP (Vw32_pass_lwindow_to_system
))
179 /* Prevent system from acting on keyup (which opens the Start
180 menu if no other key was pressed) by simulating a press of
181 Space which we will ignore. */
182 if ((mod_key_state
& LEFT_WIN_PRESSED
) == 0)
184 if (NUMBERP (Vw32_phantom_key_code
))
185 faked_key
= XUINT (Vw32_phantom_key_code
) & 255;
187 faked_key
= VK_SPACE
;
188 keybd_event (faked_key
, (BYTE
) MapVirtualKey (faked_key
, 0), 0, 0);
191 if (!w32_kbdhook_active
)
192 mod_key_state
|= LEFT_WIN_PRESSED
;
193 if (!NILP (Vw32_lwindow_modifier
))
197 if (NILP (Vw32_pass_rwindow_to_system
))
199 if ((mod_key_state
& RIGHT_WIN_PRESSED
) == 0)
201 if (NUMBERP (Vw32_phantom_key_code
))
202 faked_key
= XUINT (Vw32_phantom_key_code
) & 255;
204 faked_key
= VK_SPACE
;
205 keybd_event (faked_key
, (BYTE
) MapVirtualKey (faked_key
, 0), 0, 0);
208 if (!w32_kbdhook_active
)
209 mod_key_state
|= RIGHT_WIN_PRESSED
;
210 if (!NILP (Vw32_rwindow_modifier
))
214 mod_key_state
|= APPS_PRESSED
;
215 if (!NILP (Vw32_apps_modifier
))
219 /* Decide whether to treat as modifier or function key. */
220 if (NILP (Vw32_enable_caps_lock
))
221 goto disable_lock_key
;
224 /* Decide whether to treat as modifier or function key. */
225 if (NILP (Vw32_enable_num_lock
))
226 goto disable_lock_key
;
229 /* Decide whether to treat as modifier or function key. */
230 if (NILP (Vw32_scroll_lock_modifier
))
231 goto disable_lock_key
;
234 /* Ensure the appropriate lock key state is off (and the
235 indicator light as well). */
236 wParam
= event
->wVirtualKeyCode
;
237 if (GetAsyncKeyState (wParam
) & 0x8000)
239 /* Fake another press of the relevant key. Apparently, this
240 really is the only way to turn off the indicator. */
242 keybd_event ((BYTE
) wParam
, (BYTE
) MapVirtualKey (wParam
, 0),
243 KEYEVENTF_EXTENDEDKEY
| KEYEVENTF_KEYUP
, 0);
244 keybd_event ((BYTE
) wParam
, (BYTE
) MapVirtualKey (wParam
, 0),
245 KEYEVENTF_EXTENDEDKEY
| 0, 0);
246 keybd_event ((BYTE
) wParam
, (BYTE
) MapVirtualKey (wParam
, 0),
247 KEYEVENTF_EXTENDEDKEY
| KEYEVENTF_KEYUP
, 0);
255 /* Windows maps Ctrl-Pause (aka Ctrl-Break) into VK_CANCEL,
256 which is confusing for purposes of key binding; convert
257 VK_CANCEL events into VK_PAUSE events. */
258 event
->wVirtualKeyCode
= VK_PAUSE
;
261 /* Windows maps Ctrl-NumLock into VK_PAUSE, which is confusing
262 for purposes of key binding; convert these back into
263 VK_NUMLOCK events, at least when we want to see NumLock key
264 presses. (Note that there is never any possibility that
265 VK_PAUSE with Ctrl really is C-Pause as per above.) */
266 if (NILP (Vw32_enable_num_lock
)
267 && (event
->dwControlKeyState
268 & (LEFT_CTRL_PRESSED
| RIGHT_CTRL_PRESSED
)) != 0)
269 event
->wVirtualKeyCode
= VK_NUMLOCK
;
273 /* Recognize state of Windows and Apps keys. */
274 event
->dwControlKeyState
|= mod_key_state
;
275 if (w32_kbdhook_active
)
277 if (check_w32_winkey_state (VK_LWIN
))
278 event
->dwControlKeyState
|= LEFT_WIN_PRESSED
;
279 if (check_w32_winkey_state (VK_RWIN
))
280 event
->dwControlKeyState
|= RIGHT_WIN_PRESSED
;
283 /* Distinguish numeric keypad keys from extended keys. */
284 event
->wVirtualKeyCode
=
285 map_keypad_keys (event
->wVirtualKeyCode
,
286 (event
->dwControlKeyState
& ENHANCED_KEY
));
288 if (lispy_function_keys
[event
->wVirtualKeyCode
] == 0)
290 if (!NILP (Vw32_recognize_altgr
)
291 && (event
->dwControlKeyState
& LEFT_CTRL_PRESSED
)
292 && (event
->dwControlKeyState
& RIGHT_ALT_PRESSED
))
294 /* Don't try to interpret AltGr key chords; ToAscii seems not
295 to process them correctly. */
297 /* Handle key chords including any modifiers other than shift
298 directly, in order to preserve as much modifier information as
300 else if (event
->dwControlKeyState
301 & ( RIGHT_CTRL_PRESSED
| LEFT_CTRL_PRESSED
302 | RIGHT_ALT_PRESSED
| LEFT_ALT_PRESSED
303 | (!NILP (Vw32_lwindow_modifier
) ? LEFT_WIN_PRESSED
: 0)
304 | (!NILP (Vw32_rwindow_modifier
) ? RIGHT_WIN_PRESSED
: 0)
305 | (!NILP (Vw32_apps_modifier
) ? APPS_PRESSED
: 0)
306 | (!NILP (Vw32_scroll_lock_modifier
) ? SCROLLLOCK_ON
: 0)))
308 /* Don't translate modified alphabetic keystrokes, so the user
309 doesn't need to constantly switch layout to type control or
310 meta keystrokes when the normal layout translates
311 alphabetic characters to non-ascii characters. */
312 if ('A' <= event
->wVirtualKeyCode
&& event
->wVirtualKeyCode
<= 'Z')
314 event
->uChar
.AsciiChar
= event
->wVirtualKeyCode
;
315 if ((event
->dwControlKeyState
& SHIFT_PRESSED
) == 0)
316 event
->uChar
.AsciiChar
+= ('a' - 'A');
318 /* Try to handle unrecognized keystrokes by determining the
319 base character (ie. translating the base key plus shift
321 else if (event
->uChar
.AsciiChar
== 0)
322 w32_kbd_patch_key (event
, -1);
325 if (event
->uChar
.AsciiChar
== 0)
327 emacs_ev
->kind
= NO_EVENT
;
330 else if (event
->uChar
.AsciiChar
> 0)
332 /* Pure ASCII characters < 128. */
333 emacs_ev
->kind
= ASCII_KEYSTROKE_EVENT
;
334 emacs_ev
->code
= event
->uChar
.AsciiChar
;
336 else if (event
->uChar
.UnicodeChar
> 0
337 && w32_console_unicode_input
)
339 /* Unicode codepoint; only valid if we are using Unicode
340 console input mode. */
341 emacs_ev
->kind
= MULTIBYTE_CHAR_KEYSTROKE_EVENT
;
342 emacs_ev
->code
= event
->uChar
.UnicodeChar
;
346 /* Fallback handling of non-ASCII characters for non-Unicode
347 versions of Windows, and for non-Unicode input on NT
348 family of Windows. Only characters in the current
349 console codepage are supported by this fallback. */
354 /* Get the current console input codepage to interpret this
355 key with. Note that the system defaults for the OEM
356 codepage could have been changed by calling SetConsoleCP
357 or w32-set-console-codepage, so using GetLocaleInfo to
358 get LOCALE_IDEFAULTCODEPAGE is not TRT here. */
359 cpId
= GetConsoleCP ();
362 dbcs
[1] = event
->uChar
.AsciiChar
;
366 if (!MultiByteToWideChar (cpId
, 0, dbcs
, 2, &code
, 1))
369 DebPrint (("Invalid DBCS sequence: %d %d\n",
371 emacs_ev
->kind
= NO_EVENT
;
374 else if (IsDBCSLeadByteEx (cpId
, dbcs
[1]))
377 emacs_ev
->kind
= NO_EVENT
;
381 if (!MultiByteToWideChar (cpId
, 0, &dbcs
[1], 1, &code
, 1))
384 DebPrint (("Invalid character: %d\n", dbcs
[1]));
385 emacs_ev
->kind
= NO_EVENT
;
388 emacs_ev
->kind
= MULTIBYTE_CHAR_KEYSTROKE_EVENT
;
389 emacs_ev
->code
= code
;
394 /* Function keys and other non-character keys. */
395 emacs_ev
->kind
= NON_ASCII_KEYSTROKE_EVENT
;
396 emacs_ev
->code
= event
->wVirtualKeyCode
;
399 XSETFRAME (emacs_ev
->frame_or_window
, get_frame ());
400 emacs_ev
->modifiers
= w32_kbd_mods_to_emacs (event
->dwControlKeyState
,
401 event
->wVirtualKeyCode
);
402 emacs_ev
->timestamp
= GetTickCount ();
406 /* Mouse position hook. */
408 w32_console_mouse_position (struct frame
**f
,
410 Lisp_Object
*bar_window
,
411 enum scroll_bar_part
*part
,
422 *part
= scroll_bar_above_handle
;
423 SELECTED_FRAME ()->mouse_moved
= 0;
425 XSETINT (*x
, movement_pos
.X
);
426 XSETINT (*y
, movement_pos
.Y
);
427 *time
= movement_time
;
432 /* Remember mouse motion and notify emacs. */
434 mouse_moved_to (int x
, int y
)
436 /* If we're in the same place, ignore it. */
437 if (x
!= movement_pos
.X
|| y
!= movement_pos
.Y
)
439 SELECTED_FRAME ()->mouse_moved
= 1;
442 movement_time
= GetTickCount ();
446 /* Consoles return button bits in a strange order:
447 least significant - Leftmost button
448 next - Rightmost button
452 For the 3 standard buttons, we have:
456 Others increase from there. */
458 #define NUM_TRANSLATED_MOUSE_BUTTONS 5
459 static int emacs_button_translation
[NUM_TRANSLATED_MOUSE_BUTTONS
] =
465 do_mouse_event (MOUSE_EVENT_RECORD
*event
,
466 struct input_event
*emacs_ev
)
468 static DWORD button_state
= 0;
469 static Lisp_Object last_mouse_window
;
470 DWORD but_change
, mask
, flags
= event
->dwEventFlags
;
477 struct frame
*f
= get_frame ();
478 Mouse_HLInfo
*hlinfo
= MOUSE_HL_INFO (f
);
479 int mx
= event
->dwMousePosition
.X
, my
= event
->dwMousePosition
.Y
;
481 mouse_moved_to (mx
, my
);
485 if (hlinfo
->mouse_face_hidden
)
487 hlinfo
->mouse_face_hidden
= 0;
488 clear_mouse_face (hlinfo
);
491 /* Generate SELECT_WINDOW_EVENTs when needed. */
492 if (!NILP (Vmouse_autoselect_window
))
494 Lisp_Object mouse_window
= window_from_coordinates (f
, mx
, my
,
496 /* A window will be selected only when it is not
497 selected now, and the last mouse movement event was
498 not in it. A minibuffer window will be selected iff
500 if (WINDOWP (mouse_window
)
501 && !EQ (mouse_window
, last_mouse_window
)
502 && !EQ (mouse_window
, selected_window
))
504 struct input_event event
;
507 event
.kind
= SELECT_WINDOW_EVENT
;
508 event
.frame_or_window
= mouse_window
;
510 event
.timestamp
= movement_time
;
511 kbd_buffer_store_event (&event
);
513 last_mouse_window
= mouse_window
;
516 last_mouse_window
= Qnil
;
518 previous_help_echo_string
= help_echo_string
;
519 help_echo_string
= help_echo_object
= help_echo_window
= Qnil
;
521 note_mouse_highlight (f
, mx
, my
);
522 /* If the contents of the global variable help_echo has
523 changed (inside note_mouse_highlight), generate a HELP_EVENT. */
524 if (!NILP (help_echo_string
) || !NILP (previous_help_echo_string
))
525 gen_help_event (help_echo_string
, selected_frame
,
526 help_echo_window
, help_echo_object
,
529 /* We already called kbd_buffer_store_event, so indicate the
530 the caller it shouldn't. */
536 struct frame
*f
= get_frame ();
537 int mx
= event
->dwMousePosition
.X
, my
= event
->dwMousePosition
.Y
;
538 bool down_p
= (event
->dwButtonState
& 0x10000000) != 0;
541 flags
== MOUSE_HWHEELED
? HORIZ_WHEEL_EVENT
: WHEEL_EVENT
;
543 emacs_ev
->modifiers
= down_p
? down_modifier
: up_modifier
;
544 emacs_ev
->modifiers
|=
545 w32_kbd_mods_to_emacs (event
->dwControlKeyState
, 0);
546 XSETINT (emacs_ev
->x
, mx
);
547 XSETINT (emacs_ev
->y
, my
);
548 XSETFRAME (emacs_ev
->frame_or_window
, f
);
549 emacs_ev
->arg
= Qnil
;
550 emacs_ev
->timestamp
= GetTickCount ();
554 default: /* mouse pressed or released */
555 /* It looks like the console code sends us a button-release
556 mouse event with dwButtonState == 0 when a window is
557 activated and when the mouse is first clicked. Ignore this
559 if (event
->dwButtonState
== button_state
)
562 emacs_ev
->kind
= MOUSE_CLICK_EVENT
;
564 /* Find out what button has changed state since the last button
566 but_change
= button_state
^ event
->dwButtonState
;
568 for (i
= 0; mask
; i
++, mask
<<= 1)
569 if (but_change
& mask
)
571 if (i
< NUM_TRANSLATED_MOUSE_BUTTONS
)
572 emacs_ev
->code
= emacs_button_translation
[i
];
578 button_state
= event
->dwButtonState
;
579 emacs_ev
->modifiers
=
580 w32_kbd_mods_to_emacs (event
->dwControlKeyState
, 0)
581 | ((event
->dwButtonState
& mask
) ? down_modifier
: up_modifier
);
583 XSETFASTINT (emacs_ev
->x
, event
->dwMousePosition
.X
);
584 XSETFASTINT (emacs_ev
->y
, event
->dwMousePosition
.Y
);
585 XSETFRAME (emacs_ev
->frame_or_window
, get_frame ());
586 emacs_ev
->arg
= Qnil
;
587 emacs_ev
->timestamp
= GetTickCount ();
594 resize_event (WINDOW_BUFFER_SIZE_RECORD
*event
)
596 struct frame
*f
= get_frame ();
598 change_frame_size (f
, event
->dwSize
.X
, event
->dwSize
.Y
599 - FRAME_MENU_BAR_LINES (f
), 0, 1, 0, 0);
600 SET_FRAME_GARBAGED (f
);
604 maybe_generate_resize_event (void)
606 CONSOLE_SCREEN_BUFFER_INFO info
;
607 struct frame
*f
= get_frame ();
609 GetConsoleScreenBufferInfo (GetStdHandle (STD_OUTPUT_HANDLE
), &info
);
611 /* It is okay to call this unconditionally, since it will do nothing
612 if the size hasn't actually changed. */
613 change_frame_size (f
,
614 1 + info
.srWindow
.Right
- info
.srWindow
.Left
,
615 1 + info
.srWindow
.Bottom
- info
.srWindow
.Top
616 - FRAME_MENU_BAR_LINES (f
), 0, 1, 0, 0);
621 handle_file_notifications (struct input_event
*hold_quit
)
623 struct notifications_set
*ns
= NULL
;
627 /* We cannot process notification before Emacs is fully initialized,
628 since we need the UTF-16LE coding-system to be set up. */
638 /* Find out if there is a record available in the linked list of
639 notifications sets. If so, unlink te set from the linked list.
640 Use the critical section. */
642 if (notifications_set_head
->next
!= notifications_set_head
)
644 ns
= notifications_set_head
->next
;
645 ns
->prev
->next
= ns
->next
;
646 ns
->next
->prev
= ns
->prev
;
654 BYTE
*p
= ns
->notifications
;
655 FILE_NOTIFY_INFORMATION
*fni
= (PFILE_NOTIFY_INFORMATION
)p
;
657 = offsetof (FILE_NOTIFY_INFORMATION
, FileName
) + sizeof(wchar_t);
658 struct input_event inev
;
659 DWORD info_size
= ns
->size
;
660 Lisp_Object cs
= Qutf_16le
;
661 Lisp_Object obj
= w32_get_watch_object (ns
->desc
);
663 /* notifications size could be zero when the buffer of
664 notifications overflowed on the OS level, or when the
665 directory being watched was itself deleted. Do nothing in
668 && !NILP (obj
) && CONSP (obj
))
670 Lisp_Object callback
= XCDR (obj
);
674 while (info_size
>= min_size
)
676 Lisp_Object utf_16_fn
677 = make_unibyte_string ((char *)fni
->FileName
,
678 fni
->FileNameLength
);
679 /* Note: mule-conf is preloaded, so utf-16le must
680 already be defined at this point. */
682 = code_convert_string_norecord (utf_16_fn
, cs
, 0);
683 Lisp_Object action
= lispy_file_action (fni
->Action
);
685 inev
.kind
= FILE_NOTIFY_EVENT
;
686 inev
.timestamp
= GetTickCount ();
688 inev
.frame_or_window
= callback
;
689 inev
.arg
= Fcons (action
, fname
);
690 inev
.arg
= list3 (make_pointer_integer (ns
->desc
),
692 kbd_buffer_store_event_hold (&inev
, hold_quit
);
694 if (!fni
->NextEntryOffset
)
696 p
+= fni
->NextEntryOffset
;
697 fni
= (PFILE_NOTIFY_INFORMATION
)p
;
698 info_size
-= fni
->NextEntryOffset
;
701 /* Free this notification set. */
702 free (ns
->notifications
);
708 #else /* !HAVE_W32NOTIFY */
710 handle_file_notifications (struct input_event
*hold_quit
)
714 #endif /* !HAVE_W32NOTIFY */
716 /* Here's an overview of how Emacs input works in non-GUI sessions on
717 MS-Windows. (For description of the GUI input, see the commentary
718 before w32_msg_pump in w32fns.c.)
720 When Emacs is idle, it loops inside wait_reading_process_output,
721 calling pselect periodically to check whether any input is
722 available. On Windows, pselect is redirected to sys_select, which
723 uses MsgWaitForMultipleObjects to wait for input, either from the
724 keyboard or from any of the Emacs subprocesses. In addition,
725 MsgWaitForMultipleObjects wakes up when some Windows message is
726 posted to the input queue of the Emacs's main thread (which is the
727 thread in which sys_select runs).
729 When the Emacs's console window has focus, Windows sends input
730 events that originate from the keyboard or the mouse; these events
731 wake up MsgWaitForMultipleObjects, which reports that input is
732 available. Emacs then calls w32_console_read_socket, below, to
733 read the input. w32_console_read_socket uses
734 GetNumberOfConsoleInputEvents and ReadConsoleInput to peek at and
735 read the console input events.
737 One type of non-keyboard input event that gets reported as input
738 available is due to the Emacs's console window receiving focus.
739 When that happens, Emacs gets the FOCUS_EVENT event and sys_select
740 reports some input; however, w32_console_read_socket ignores such
741 events when called to read them.
743 Note that any other Windows message sent to the main thread will
744 also wake up MsgWaitForMultipleObjects. These messages get
745 immediately dispatched to their destinations by calling
746 drain_message_queue. */
749 w32_console_read_socket (struct terminal
*terminal
,
750 struct input_event
*hold_quit
)
759 int nfnotify
= handle_file_notifications (hold_quit
);
761 nev
= fill_queue (0);
764 /* If nev == -1, there was some kind of error
765 If nev == 0 then no events were available
774 struct input_event inev
;
775 /* Having a separate variable with this value makes
776 debugging easier, as otherwise the compiler might
777 rearrange the switch below in a way that makes it hard to
778 track the event type. */
779 unsigned evtype
= queue_ptr
->EventType
;
782 inev
.kind
= NO_EVENT
;
788 add
= key_event (&queue_ptr
->Event
.KeyEvent
, &inev
, &isdead
);
789 if (add
== -1) /* 95.7.25 by himi */
795 kbd_buffer_store_event_hold (&inev
, hold_quit
);
799 add
= do_mouse_event (&queue_ptr
->Event
.MouseEvent
, &inev
);
801 kbd_buffer_store_event_hold (&inev
, hold_quit
);
804 case WINDOW_BUFFER_SIZE_EVENT
:
805 if (w32_use_full_screen_buffer
)
806 resize_event (&queue_ptr
->Event
.WindowBufferSizeEvent
);
811 /* Internal event types, ignored. */
820 /* We don't get told about changes in the window size (only the buffer
821 size, which we no longer care about), so we have to check it
823 if (!w32_use_full_screen_buffer
)
824 maybe_generate_resize_event ();