comparison src/w32term.c @ 21740:92c501ecca49

(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.
author Geoff Voelker <voelker@cs.washington.edu>
date Thu, 23 Apr 1998 23:42:28 +0000
parents 2624d8dcc73f
children 6b659713b90b
comparison
equal deleted inserted replaced
21739:e02be2b47d18 21740:92c501ecca49
2770 case WM_PAINT: 2770 case WM_PAINT:
2771 f = x_window_to_frame (dpyinfo, msg.msg.hwnd); 2771 f = x_window_to_frame (dpyinfo, msg.msg.hwnd);
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. */
2786 if (f->iconified) 2794 if (f->iconified)
2787 { 2795 {
3142 } 3150 }
3143 break; 3151 break;
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;
3189 3164
3190 case WM_DISPLAYCHANGE: 3165 case WM_DISPLAYCHANGE:
4521 "Recognize right-alt and left-ctrl as AltGr.\n\ 4496 "Recognize right-alt and left-ctrl as AltGr.\n\
4522 When nil, the right-alt and left-ctrl key combination is\n\ 4497 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