Mercurial > emacs
comparison src/w32inevt.c @ 89909:68c22ea6027c
Sync to HEAD
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 16 Apr 2004 12:51:06 +0000 |
parents | 375f2633d815 |
children | 4c90ffeb71c5 |
comparison
equal
deleted
inserted
replaced
89908:ee1402f7b568 | 89909:68c22ea6027c |
---|---|
640 1 + info.srWindow.Right - info.srWindow.Left, | 640 1 + info.srWindow.Right - info.srWindow.Left, |
641 0, 0); | 641 0, 0); |
642 } | 642 } |
643 | 643 |
644 int | 644 int |
645 w32_console_read_socket (int sd, struct input_event *bufp, int numchars, | 645 w32_console_read_socket (int sd, int expected, struct input_event *hold_quit) |
646 int expected) | |
647 { | 646 { |
648 BOOL no_events = TRUE; | 647 BOOL no_events = TRUE; |
649 int nev, ret = 0, add; | 648 int nev, ret = 0, add; |
650 int isdead; | 649 int isdead; |
651 | 650 |
668 so return. */ | 667 so return. */ |
669 UNBLOCK_INPUT; | 668 UNBLOCK_INPUT; |
670 return nev; | 669 return nev; |
671 } | 670 } |
672 | 671 |
673 while (nev > 0 && numchars > 0) | 672 while (nev > 0) |
674 { | 673 { |
674 struct input_event inev; | |
675 | |
676 EVENT_INIT (inev); | |
677 inev.kind = NO_EVENT; | |
678 inev.arg = Qnil; | |
679 | |
675 switch (queue_ptr->EventType) | 680 switch (queue_ptr->EventType) |
676 { | 681 { |
677 case KEY_EVENT: | 682 case KEY_EVENT: |
678 add = key_event (&queue_ptr->Event.KeyEvent, bufp, &isdead); | 683 add = key_event (&queue_ptr->Event.KeyEvent, &inev, &isdead); |
679 if (add == -1) /* 95.7.25 by himi */ | 684 if (add == -1) /* 95.7.25 by himi */ |
680 { | 685 { |
681 queue_ptr--; | 686 queue_ptr--; |
682 add = 1; | 687 add = 1; |
683 } | 688 } |
684 bufp += add; | 689 if (add) |
685 ret += add; | 690 kbd_buffer_store_event_hold (&inev, hold_quit); |
686 numchars -= add; | |
687 break; | 691 break; |
688 | 692 |
689 case MOUSE_EVENT: | 693 case MOUSE_EVENT: |
690 add = do_mouse_event (&queue_ptr->Event.MouseEvent, bufp); | 694 add = do_mouse_event (&queue_ptr->Event.MouseEvent, &inev); |
691 bufp += add; | 695 if (add) |
692 ret += add; | 696 kbd_buffer_store_event_hold (&inev, hold_quit); |
693 numchars -= add; | |
694 break; | 697 break; |
695 | 698 |
696 case WINDOW_BUFFER_SIZE_EVENT: | 699 case WINDOW_BUFFER_SIZE_EVENT: |
697 if (w32_use_full_screen_buffer) | 700 if (w32_use_full_screen_buffer) |
698 resize_event (&queue_ptr->Event.WindowBufferSizeEvent); | 701 resize_event (&queue_ptr->Event.WindowBufferSizeEvent); |
719 maybe_generate_resize_event (); | 722 maybe_generate_resize_event (); |
720 | 723 |
721 UNBLOCK_INPUT; | 724 UNBLOCK_INPUT; |
722 return ret; | 725 return ret; |
723 } | 726 } |
727 | |
728 /* arch-tag: 0bcb39b7-d085-4b85-9070-6750e8c03047 | |
729 (do not change this comment) */ |