diff options
| author | Geoff Voelker | 1998-04-23 23:42:28 +0000 |
|---|---|---|
| committer | Geoff Voelker | 1998-04-23 23:42:28 +0000 |
| commit | 014b6ea1df34c970b5d409bf36b961ed2e9842a6 (patch) | |
| tree | b134d9519369558b63defcdb559a238364110273 | |
| parent | f9ba66ce95c4ec61dcdb2af9f19bc58da8a66c5d (diff) | |
| download | emacs-014b6ea1df34c970b5d409bf36b961ed2e9842a6.tar.gz emacs-014b6ea1df34c970b5d409bf36b961ed2e9842a6.zip | |
(w32_read_socket): Don't misinterpret WM_PAINT message
as an expose event if the repaint region is actually empty. Also
use the standard menubar_selection_callback routine.
| -rw-r--r-- | src/w32term.c | 56 |
1 files changed, 15 insertions, 41 deletions
diff --git a/src/w32term.c b/src/w32term.c index 3b3156d150f..0ac08d7c8e0 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -2772,14 +2772,22 @@ w32_read_socket (sd, bufp, numchars, expected) | |||
| 2772 | 2772 | ||
| 2773 | if (f) | 2773 | if (f) |
| 2774 | { | 2774 | { |
| 2775 | if (f->async_visible != 1) | 2775 | if (msg.rect.right == msg.rect.left || |
| 2776 | msg.rect.bottom == msg.rect.top) | ||
| 2776 | { | 2777 | { |
| 2777 | /* Definitely not obscured, so mark as visible. */ | 2778 | /* We may get paint messages even though the client |
| 2779 | area is clipped - these are not expose events. */ | ||
| 2780 | DebPrint (("clipped frame %04x (%s) got WM_PAINT\n", f, | ||
| 2781 | XSTRING (f->name)->data)); | ||
| 2782 | } | ||
| 2783 | else if (f->async_visible != 1) | ||
| 2784 | { | ||
| 2785 | /* Definitely not obscured, so mark as visible. */ | ||
| 2778 | f->async_visible = 1; | 2786 | f->async_visible = 1; |
| 2779 | f->async_iconified = 0; | 2787 | f->async_iconified = 0; |
| 2780 | SET_FRAME_GARBAGED (f); | 2788 | SET_FRAME_GARBAGED (f); |
| 2781 | DebPrint (("frame %04x (%s) reexposed\n", f, | 2789 | DebPrint (("frame %04x (%s) reexposed\n", f, |
| 2782 | XSTRING (f->name)->data)); | 2790 | XSTRING (f->name)->data)); |
| 2783 | 2791 | ||
| 2784 | /* WM_PAINT serves as MapNotify as well, so report | 2792 | /* WM_PAINT serves as MapNotify as well, so report |
| 2785 | visibility changes properly. */ | 2793 | visibility changes properly. */ |
| @@ -3144,45 +3152,12 @@ w32_read_socket (sd, bufp, numchars, expected) | |||
| 3144 | 3152 | ||
| 3145 | case WM_COMMAND: | 3153 | case WM_COMMAND: |
| 3146 | f = x_window_to_frame (dpyinfo, msg.msg.hwnd); | 3154 | f = x_window_to_frame (dpyinfo, msg.msg.hwnd); |
| 3147 | 3155 | ||
| 3148 | #if 1 | ||
| 3149 | if (f) | 3156 | if (f) |
| 3150 | { | 3157 | { |
| 3151 | if (msg.msg.lParam == 0) | 3158 | extern void menubar_selection_callback (FRAME_PTR f, void * client_data); |
| 3152 | { | 3159 | menubar_selection_callback (f, (void *)msg.msg.wParam); |
| 3153 | /* Came from window menu */ | ||
| 3154 | |||
| 3155 | extern Lisp_Object get_frame_menubar_event (); | ||
| 3156 | Lisp_Object event = get_frame_menubar_event (f, msg.msg.wParam); | ||
| 3157 | struct input_event buf; | ||
| 3158 | Lisp_Object frame; | ||
| 3159 | |||
| 3160 | XSETFRAME (frame, f); | ||
| 3161 | buf.kind = menu_bar_event; | ||
| 3162 | |||
| 3163 | /* Store initial menu bar event */ | ||
| 3164 | |||
| 3165 | if (!NILP (event)) | ||
| 3166 | { | ||
| 3167 | buf.frame_or_window = Fcons (frame, Fcons (Qmenu_bar, Qnil)); | ||
| 3168 | kbd_buffer_store_event (&buf); | ||
| 3169 | } | ||
| 3170 | |||
| 3171 | /* Enqueue the events */ | ||
| 3172 | |||
| 3173 | while (!NILP (event)) | ||
| 3174 | { | ||
| 3175 | buf.frame_or_window = Fcons (frame, XCONS (event)->car); | ||
| 3176 | kbd_buffer_store_event (&buf); | ||
| 3177 | event = XCONS (event)->cdr; | ||
| 3178 | } | ||
| 3179 | } | ||
| 3180 | else | ||
| 3181 | { | ||
| 3182 | /* Came from popup menu */ | ||
| 3183 | } | ||
| 3184 | } | 3160 | } |
| 3185 | #endif | ||
| 3186 | 3161 | ||
| 3187 | check_visibility = 1; | 3162 | check_visibility = 1; |
| 3188 | break; | 3163 | break; |
| @@ -4523,4 +4498,3 @@ When nil, the right-alt and left-ctrl key combination is\n\ | |||
| 4523 | interpreted normally."); | 4498 | interpreted normally."); |
| 4524 | Vw32_recognize_altgr = Qt; | 4499 | Vw32_recognize_altgr = Qt; |
| 4525 | } | 4500 | } |
| 4526 | |||