diff options
Diffstat (limited to 'src/w32term.c')
| -rw-r--r-- | src/w32term.c | 130 |
1 files changed, 61 insertions, 69 deletions
diff --git a/src/w32term.c b/src/w32term.c index b8227c52fed..5d5e572c475 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -197,7 +197,7 @@ static void w32_define_cursor (Window, Cursor); | |||
| 197 | 197 | ||
| 198 | void x_lower_frame (struct frame *); | 198 | void x_lower_frame (struct frame *); |
| 199 | void x_scroll_bar_clear (struct frame *); | 199 | void x_scroll_bar_clear (struct frame *); |
| 200 | void x_wm_set_size_hint (struct frame *, long, int); | 200 | void x_wm_set_size_hint (struct frame *, long, bool); |
| 201 | void x_raise_frame (struct frame *); | 201 | void x_raise_frame (struct frame *); |
| 202 | void x_set_window_size (struct frame *, int, int, int); | 202 | void x_set_window_size (struct frame *, int, int, int); |
| 203 | void x_wm_set_window_state (struct frame *, int); | 203 | void x_wm_set_window_state (struct frame *, int); |
| @@ -563,7 +563,7 @@ x_update_window_begin (struct window *w) | |||
| 563 | updated_window = w; | 563 | updated_window = w; |
| 564 | set_output_cursor (&w->cursor); | 564 | set_output_cursor (&w->cursor); |
| 565 | 565 | ||
| 566 | BLOCK_INPUT; | 566 | block_input (); |
| 567 | 567 | ||
| 568 | if (f == hlinfo->mouse_face_mouse_frame) | 568 | if (f == hlinfo->mouse_face_mouse_frame) |
| 569 | { | 569 | { |
| @@ -602,7 +602,7 @@ x_update_window_begin (struct window *w) | |||
| 602 | #endif /* 0 */ | 602 | #endif /* 0 */ |
| 603 | } | 603 | } |
| 604 | 604 | ||
| 605 | UNBLOCK_INPUT; | 605 | unblock_input (); |
| 606 | } | 606 | } |
| 607 | 607 | ||
| 608 | /* Draw a vertical window border from (x,y0) to (x,y1) */ | 608 | /* Draw a vertical window border from (x,y0) to (x,y1) */ |
| @@ -652,7 +652,7 @@ x_update_window_end (struct window *w, int cursor_on_p, | |||
| 652 | 652 | ||
| 653 | if (!w->pseudo_window_p) | 653 | if (!w->pseudo_window_p) |
| 654 | { | 654 | { |
| 655 | BLOCK_INPUT; | 655 | block_input (); |
| 656 | 656 | ||
| 657 | if (cursor_on_p) | 657 | if (cursor_on_p) |
| 658 | display_and_set_cursor (w, 1, output_cursor.hpos, | 658 | display_and_set_cursor (w, 1, output_cursor.hpos, |
| @@ -662,7 +662,7 @@ x_update_window_end (struct window *w, int cursor_on_p, | |||
| 662 | if (draw_window_fringes (w, 1)) | 662 | if (draw_window_fringes (w, 1)) |
| 663 | x_draw_vertical_border (w); | 663 | x_draw_vertical_border (w); |
| 664 | 664 | ||
| 665 | UNBLOCK_INPUT; | 665 | unblock_input (); |
| 666 | } | 666 | } |
| 667 | 667 | ||
| 668 | /* If a row with mouse-face was overwritten, arrange for | 668 | /* If a row with mouse-face was overwritten, arrange for |
| @@ -714,13 +714,13 @@ w32_frame_up_to_date (struct frame *f) | |||
| 714 | if (hlinfo->mouse_face_deferred_gc | 714 | if (hlinfo->mouse_face_deferred_gc |
| 715 | || f == hlinfo->mouse_face_mouse_frame) | 715 | || f == hlinfo->mouse_face_mouse_frame) |
| 716 | { | 716 | { |
| 717 | BLOCK_INPUT; | 717 | block_input (); |
| 718 | if (hlinfo->mouse_face_mouse_frame) | 718 | if (hlinfo->mouse_face_mouse_frame) |
| 719 | note_mouse_highlight (hlinfo->mouse_face_mouse_frame, | 719 | note_mouse_highlight (hlinfo->mouse_face_mouse_frame, |
| 720 | hlinfo->mouse_face_mouse_x, | 720 | hlinfo->mouse_face_mouse_x, |
| 721 | hlinfo->mouse_face_mouse_y); | 721 | hlinfo->mouse_face_mouse_y); |
| 722 | hlinfo->mouse_face_deferred_gc = 0; | 722 | hlinfo->mouse_face_deferred_gc = 0; |
| 723 | UNBLOCK_INPUT; | 723 | unblock_input (); |
| 724 | } | 724 | } |
| 725 | } | 725 | } |
| 726 | } | 726 | } |
| @@ -761,7 +761,7 @@ x_after_update_window_line (struct glyph_row *desired_row) | |||
| 761 | { | 761 | { |
| 762 | int y = WINDOW_TO_FRAME_PIXEL_Y (w, max (0, desired_row->y)); | 762 | int y = WINDOW_TO_FRAME_PIXEL_Y (w, max (0, desired_row->y)); |
| 763 | 763 | ||
| 764 | BLOCK_INPUT; | 764 | block_input (); |
| 765 | { | 765 | { |
| 766 | HDC hdc = get_frame_dc (f); | 766 | HDC hdc = get_frame_dc (f); |
| 767 | w32_clear_area (f, hdc, 0, y, width, height); | 767 | w32_clear_area (f, hdc, 0, y, width, height); |
| @@ -769,7 +769,7 @@ x_after_update_window_line (struct glyph_row *desired_row) | |||
| 769 | y, width, height); | 769 | y, width, height); |
| 770 | release_frame_dc (f, hdc); | 770 | release_frame_dc (f, hdc); |
| 771 | } | 771 | } |
| 772 | UNBLOCK_INPUT; | 772 | unblock_input (); |
| 773 | } | 773 | } |
| 774 | } | 774 | } |
| 775 | 775 | ||
| @@ -2646,7 +2646,7 @@ x_clear_frame (struct frame *f) | |||
| 2646 | 2646 | ||
| 2647 | /* We don't set the output cursor here because there will always | 2647 | /* We don't set the output cursor here because there will always |
| 2648 | follow an explicit cursor_to. */ | 2648 | follow an explicit cursor_to. */ |
| 2649 | BLOCK_INPUT; | 2649 | block_input (); |
| 2650 | 2650 | ||
| 2651 | w32_clear_window (f); | 2651 | w32_clear_window (f); |
| 2652 | 2652 | ||
| @@ -2654,7 +2654,7 @@ x_clear_frame (struct frame *f) | |||
| 2654 | colors or something like that, then they should be notified. */ | 2654 | colors or something like that, then they should be notified. */ |
| 2655 | x_scroll_bar_clear (f); | 2655 | x_scroll_bar_clear (f); |
| 2656 | 2656 | ||
| 2657 | UNBLOCK_INPUT; | 2657 | unblock_input (); |
| 2658 | } | 2658 | } |
| 2659 | 2659 | ||
| 2660 | 2660 | ||
| @@ -2663,7 +2663,7 @@ x_clear_frame (struct frame *f) | |||
| 2663 | static void | 2663 | static void |
| 2664 | w32_ring_bell (struct frame *f) | 2664 | w32_ring_bell (struct frame *f) |
| 2665 | { | 2665 | { |
| 2666 | BLOCK_INPUT; | 2666 | block_input (); |
| 2667 | 2667 | ||
| 2668 | if (FRAME_W32_P (f) && visible_bell) | 2668 | if (FRAME_W32_P (f) && visible_bell) |
| 2669 | { | 2669 | { |
| @@ -2680,7 +2680,7 @@ w32_ring_bell (struct frame *f) | |||
| 2680 | else | 2680 | else |
| 2681 | w32_sys_ring_bell (f); | 2681 | w32_sys_ring_bell (f); |
| 2682 | 2682 | ||
| 2683 | UNBLOCK_INPUT; | 2683 | unblock_input (); |
| 2684 | } | 2684 | } |
| 2685 | 2685 | ||
| 2686 | 2686 | ||
| @@ -2779,7 +2779,7 @@ x_scroll_run (struct window *w, struct run *run) | |||
| 2779 | expect_dirty = CreateRectRgn (x, y, x + width, to_y); | 2779 | expect_dirty = CreateRectRgn (x, y, x + width, to_y); |
| 2780 | } | 2780 | } |
| 2781 | 2781 | ||
| 2782 | BLOCK_INPUT; | 2782 | block_input (); |
| 2783 | 2783 | ||
| 2784 | /* Cursor off. Will be switched on again in x_update_window_end. */ | 2784 | /* Cursor off. Will be switched on again in x_update_window_end. */ |
| 2785 | updated_window = w; | 2785 | updated_window = w; |
| @@ -2813,7 +2813,7 @@ x_scroll_run (struct window *w, struct run *run) | |||
| 2813 | DeleteObject (combined); | 2813 | DeleteObject (combined); |
| 2814 | } | 2814 | } |
| 2815 | 2815 | ||
| 2816 | UNBLOCK_INPUT; | 2816 | unblock_input (); |
| 2817 | DeleteObject (expect_dirty); | 2817 | DeleteObject (expect_dirty); |
| 2818 | } | 2818 | } |
| 2819 | 2819 | ||
| @@ -2998,9 +2998,9 @@ x_get_keysym_name (int keysym) | |||
| 2998 | /* Make static so we can always return it */ | 2998 | /* Make static so we can always return it */ |
| 2999 | static char value[100]; | 2999 | static char value[100]; |
| 3000 | 3000 | ||
| 3001 | BLOCK_INPUT; | 3001 | block_input (); |
| 3002 | GetKeyNameText (keysym, value, 100); | 3002 | GetKeyNameText (keysym, value, 100); |
| 3003 | UNBLOCK_INPUT; | 3003 | unblock_input (); |
| 3004 | 3004 | ||
| 3005 | return value; | 3005 | return value; |
| 3006 | } | 3006 | } |
| @@ -3308,7 +3308,7 @@ w32_mouse_position (FRAME_PTR *fp, int insist, Lisp_Object *bar_window, | |||
| 3308 | { | 3308 | { |
| 3309 | FRAME_PTR f1; | 3309 | FRAME_PTR f1; |
| 3310 | 3310 | ||
| 3311 | BLOCK_INPUT; | 3311 | block_input (); |
| 3312 | 3312 | ||
| 3313 | if (! NILP (last_mouse_scroll_bar) && insist == 0) | 3313 | if (! NILP (last_mouse_scroll_bar) && insist == 0) |
| 3314 | x_scroll_bar_report_motion (fp, bar_window, part, x, y, time); | 3314 | x_scroll_bar_report_motion (fp, bar_window, part, x, y, time); |
| @@ -3382,7 +3382,7 @@ w32_mouse_position (FRAME_PTR *fp, int insist, Lisp_Object *bar_window, | |||
| 3382 | } | 3382 | } |
| 3383 | } | 3383 | } |
| 3384 | 3384 | ||
| 3385 | UNBLOCK_INPUT; | 3385 | unblock_input (); |
| 3386 | } | 3386 | } |
| 3387 | 3387 | ||
| 3388 | 3388 | ||
| @@ -3480,12 +3480,12 @@ w32_set_scroll_bar_thumb (struct scroll_bar *bar, | |||
| 3480 | if (draggingp) | 3480 | if (draggingp) |
| 3481 | { | 3481 | { |
| 3482 | int near_bottom_p; | 3482 | int near_bottom_p; |
| 3483 | BLOCK_INPUT; | 3483 | block_input (); |
| 3484 | si.cbSize = sizeof (si); | 3484 | si.cbSize = sizeof (si); |
| 3485 | si.fMask = SIF_POS | SIF_PAGE; | 3485 | si.fMask = SIF_POS | SIF_PAGE; |
| 3486 | GetScrollInfo (w, SB_CTL, &si); | 3486 | GetScrollInfo (w, SB_CTL, &si); |
| 3487 | near_bottom_p = si.nPos + si.nPage >= range; | 3487 | near_bottom_p = si.nPos + si.nPage >= range; |
| 3488 | UNBLOCK_INPUT; | 3488 | unblock_input (); |
| 3489 | if (!near_bottom_p) | 3489 | if (!near_bottom_p) |
| 3490 | return; | 3490 | return; |
| 3491 | } | 3491 | } |
| @@ -3514,7 +3514,7 @@ w32_set_scroll_bar_thumb (struct scroll_bar *bar, | |||
| 3514 | 3514 | ||
| 3515 | sb_page = max (sb_page, VERTICAL_SCROLL_BAR_MIN_HANDLE); | 3515 | sb_page = max (sb_page, VERTICAL_SCROLL_BAR_MIN_HANDLE); |
| 3516 | 3516 | ||
| 3517 | BLOCK_INPUT; | 3517 | block_input (); |
| 3518 | 3518 | ||
| 3519 | si.cbSize = sizeof (si); | 3519 | si.cbSize = sizeof (si); |
| 3520 | si.fMask = SIF_PAGE | SIF_POS; | 3520 | si.fMask = SIF_PAGE | SIF_POS; |
| @@ -3523,7 +3523,7 @@ w32_set_scroll_bar_thumb (struct scroll_bar *bar, | |||
| 3523 | 3523 | ||
| 3524 | SetScrollInfo (w, SB_CTL, &si, TRUE); | 3524 | SetScrollInfo (w, SB_CTL, &si, TRUE); |
| 3525 | 3525 | ||
| 3526 | UNBLOCK_INPUT; | 3526 | unblock_input (); |
| 3527 | } | 3527 | } |
| 3528 | 3528 | ||
| 3529 | 3529 | ||
| @@ -3614,7 +3614,7 @@ x_scroll_bar_create (struct window *w, int top, int left, int width, int height) | |||
| 3614 | = XSCROLL_BAR (Fmake_vector (make_number (SCROLL_BAR_VEC_SIZE), Qnil)); | 3614 | = XSCROLL_BAR (Fmake_vector (make_number (SCROLL_BAR_VEC_SIZE), Qnil)); |
| 3615 | Lisp_Object barobj; | 3615 | Lisp_Object barobj; |
| 3616 | 3616 | ||
| 3617 | BLOCK_INPUT; | 3617 | block_input (); |
| 3618 | 3618 | ||
| 3619 | XSETWINDOW (bar->window, w); | 3619 | XSETWINDOW (bar->window, w); |
| 3620 | XSETINT (bar->top, top); | 3620 | XSETINT (bar->top, top); |
| @@ -3650,7 +3650,7 @@ x_scroll_bar_create (struct window *w, int top, int left, int width, int height) | |||
| 3650 | if (! NILP (bar->next)) | 3650 | if (! NILP (bar->next)) |
| 3651 | XSETVECTOR (XSCROLL_BAR (bar->next)->prev, bar); | 3651 | XSETVECTOR (XSCROLL_BAR (bar->next)->prev, bar); |
| 3652 | 3652 | ||
| 3653 | UNBLOCK_INPUT; | 3653 | unblock_input (); |
| 3654 | 3654 | ||
| 3655 | return bar; | 3655 | return bar; |
| 3656 | } | 3656 | } |
| @@ -3664,7 +3664,7 @@ x_scroll_bar_remove (struct scroll_bar *bar) | |||
| 3664 | { | 3664 | { |
| 3665 | FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); | 3665 | FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); |
| 3666 | 3666 | ||
| 3667 | BLOCK_INPUT; | 3667 | block_input (); |
| 3668 | 3668 | ||
| 3669 | /* Destroy the window. */ | 3669 | /* Destroy the window. */ |
| 3670 | my_destroy_window (f, SCROLL_BAR_W32_WINDOW (bar)); | 3670 | my_destroy_window (f, SCROLL_BAR_W32_WINDOW (bar)); |
| @@ -3672,7 +3672,7 @@ x_scroll_bar_remove (struct scroll_bar *bar) | |||
| 3672 | /* Dissociate this scroll bar from its window. */ | 3672 | /* Dissociate this scroll bar from its window. */ |
| 3673 | wset_vertical_scroll_bar (XWINDOW (bar->window), Qnil); | 3673 | wset_vertical_scroll_bar (XWINDOW (bar->window), Qnil); |
| 3674 | 3674 | ||
| 3675 | UNBLOCK_INPUT; | 3675 | unblock_input (); |
| 3676 | } | 3676 | } |
| 3677 | 3677 | ||
| 3678 | /* Set the handle of the vertical scroll bar for WINDOW to indicate | 3678 | /* Set the handle of the vertical scroll bar for WINDOW to indicate |
| @@ -3727,7 +3727,7 @@ w32_set_vertical_scroll_bar (struct window *w, | |||
| 3727 | if (NILP (w->vertical_scroll_bar)) | 3727 | if (NILP (w->vertical_scroll_bar)) |
| 3728 | { | 3728 | { |
| 3729 | HDC hdc; | 3729 | HDC hdc; |
| 3730 | BLOCK_INPUT; | 3730 | block_input (); |
| 3731 | if (width > 0 && height > 0) | 3731 | if (width > 0 && height > 0) |
| 3732 | { | 3732 | { |
| 3733 | hdc = get_frame_dc (f); | 3733 | hdc = get_frame_dc (f); |
| @@ -3737,7 +3737,7 @@ w32_set_vertical_scroll_bar (struct window *w, | |||
| 3737 | w32_clear_area (f, hdc, left, top, width, height); | 3737 | w32_clear_area (f, hdc, left, top, width, height); |
| 3738 | release_frame_dc (f, hdc); | 3738 | release_frame_dc (f, hdc); |
| 3739 | } | 3739 | } |
| 3740 | UNBLOCK_INPUT; | 3740 | unblock_input (); |
| 3741 | 3741 | ||
| 3742 | bar = x_scroll_bar_create (w, top, sb_left, sb_width, height); | 3742 | bar = x_scroll_bar_create (w, top, sb_left, sb_width, height); |
| 3743 | } | 3743 | } |
| @@ -3765,7 +3765,7 @@ w32_set_vertical_scroll_bar (struct window *w, | |||
| 3765 | HDC hdc; | 3765 | HDC hdc; |
| 3766 | SCROLLINFO si; | 3766 | SCROLLINFO si; |
| 3767 | 3767 | ||
| 3768 | BLOCK_INPUT; | 3768 | block_input (); |
| 3769 | if (width && height) | 3769 | if (width && height) |
| 3770 | { | 3770 | { |
| 3771 | hdc = get_frame_dc (f); | 3771 | hdc = get_frame_dc (f); |
| @@ -3801,7 +3801,7 @@ w32_set_vertical_scroll_bar (struct window *w, | |||
| 3801 | XSETINT (bar->width, sb_width); | 3801 | XSETINT (bar->width, sb_width); |
| 3802 | XSETINT (bar->height, height); | 3802 | XSETINT (bar->height, height); |
| 3803 | 3803 | ||
| 3804 | UNBLOCK_INPUT; | 3804 | unblock_input (); |
| 3805 | } | 3805 | } |
| 3806 | } | 3806 | } |
| 3807 | bar->fringe_extended_p = fringe_extended_p ? Qt : Qnil; | 3807 | bar->fringe_extended_p = fringe_extended_p ? Qt : Qnil; |
| @@ -4043,7 +4043,7 @@ x_scroll_bar_report_motion (FRAME_PTR *fp, Lisp_Object *bar_window, | |||
| 4043 | int top_range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, XINT (bar->height)); | 4043 | int top_range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, XINT (bar->height)); |
| 4044 | SCROLLINFO si; | 4044 | SCROLLINFO si; |
| 4045 | 4045 | ||
| 4046 | BLOCK_INPUT; | 4046 | block_input (); |
| 4047 | 4047 | ||
| 4048 | *fp = f; | 4048 | *fp = f; |
| 4049 | *bar_window = bar->window; | 4049 | *bar_window = bar->window; |
| @@ -4080,7 +4080,7 @@ x_scroll_bar_report_motion (FRAME_PTR *fp, Lisp_Object *bar_window, | |||
| 4080 | 4080 | ||
| 4081 | *time = last_mouse_movement_time; | 4081 | *time = last_mouse_movement_time; |
| 4082 | 4082 | ||
| 4083 | UNBLOCK_INPUT; | 4083 | unblock_input (); |
| 4084 | } | 4084 | } |
| 4085 | 4085 | ||
| 4086 | 4086 | ||
| @@ -4157,15 +4157,7 @@ w32_read_socket (struct terminal *terminal, | |||
| 4157 | struct w32_display_info *dpyinfo = &one_w32_display_info; | 4157 | struct w32_display_info *dpyinfo = &one_w32_display_info; |
| 4158 | Mouse_HLInfo *hlinfo = &dpyinfo->mouse_highlight; | 4158 | Mouse_HLInfo *hlinfo = &dpyinfo->mouse_highlight; |
| 4159 | 4159 | ||
| 4160 | if (interrupt_input_blocked) | 4160 | block_input (); |
| 4161 | { | ||
| 4162 | interrupt_input_pending = 1; | ||
| 4163 | pending_signals = 1; | ||
| 4164 | return -1; | ||
| 4165 | } | ||
| 4166 | |||
| 4167 | interrupt_input_pending = 0; | ||
| 4168 | BLOCK_INPUT; | ||
| 4169 | 4161 | ||
| 4170 | /* So people can tell when we have read the available input. */ | 4162 | /* So people can tell when we have read the available input. */ |
| 4171 | input_signal_count++; | 4163 | input_signal_count++; |
| @@ -4961,7 +4953,7 @@ w32_read_socket (struct terminal *terminal, | |||
| 4961 | } | 4953 | } |
| 4962 | } | 4954 | } |
| 4963 | 4955 | ||
| 4964 | UNBLOCK_INPUT; | 4956 | unblock_input (); |
| 4965 | return count; | 4957 | return count; |
| 4966 | } | 4958 | } |
| 4967 | 4959 | ||
| @@ -5476,7 +5468,7 @@ x_set_offset (struct frame *f, register int xoff, register int yoff, | |||
| 5476 | } | 5468 | } |
| 5477 | x_calc_absolute_position (f); | 5469 | x_calc_absolute_position (f); |
| 5478 | 5470 | ||
| 5479 | BLOCK_INPUT; | 5471 | block_input (); |
| 5480 | x_wm_set_size_hint (f, (long) 0, 0); | 5472 | x_wm_set_size_hint (f, (long) 0, 0); |
| 5481 | 5473 | ||
| 5482 | modified_left = f->left_pos; | 5474 | modified_left = f->left_pos; |
| @@ -5487,7 +5479,7 @@ x_set_offset (struct frame *f, register int xoff, register int yoff, | |||
| 5487 | modified_left, modified_top, | 5479 | modified_left, modified_top, |
| 5488 | 0, 0, | 5480 | 0, 0, |
| 5489 | SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE); | 5481 | SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE); |
| 5490 | UNBLOCK_INPUT; | 5482 | unblock_input (); |
| 5491 | } | 5483 | } |
| 5492 | 5484 | ||
| 5493 | 5485 | ||
| @@ -5528,7 +5520,7 @@ x_set_window_size (struct frame *f, int change_gravity, int cols, int rows) | |||
| 5528 | { | 5520 | { |
| 5529 | int pixelwidth, pixelheight; | 5521 | int pixelwidth, pixelheight; |
| 5530 | 5522 | ||
| 5531 | BLOCK_INPUT; | 5523 | block_input (); |
| 5532 | 5524 | ||
| 5533 | check_frame_size (f, &rows, &cols); | 5525 | check_frame_size (f, &rows, &cols); |
| 5534 | f->scroll_bar_actual_width | 5526 | f->scroll_bar_actual_width |
| @@ -5608,7 +5600,7 @@ x_set_window_size (struct frame *f, int change_gravity, int cols, int rows) | |||
| 5608 | cancel_mouse_face (f); | 5600 | cancel_mouse_face (f); |
| 5609 | #endif | 5601 | #endif |
| 5610 | 5602 | ||
| 5611 | UNBLOCK_INPUT; | 5603 | unblock_input (); |
| 5612 | } | 5604 | } |
| 5613 | 5605 | ||
| 5614 | /* Mouse warping. */ | 5606 | /* Mouse warping. */ |
| @@ -5638,7 +5630,7 @@ x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y) | |||
| 5638 | RECT rect; | 5630 | RECT rect; |
| 5639 | POINT pt; | 5631 | POINT pt; |
| 5640 | 5632 | ||
| 5641 | BLOCK_INPUT; | 5633 | block_input (); |
| 5642 | 5634 | ||
| 5643 | GetClientRect (FRAME_W32_WINDOW (f), &rect); | 5635 | GetClientRect (FRAME_W32_WINDOW (f), &rect); |
| 5644 | pt.x = rect.left + pix_x; | 5636 | pt.x = rect.left + pix_x; |
| @@ -5647,7 +5639,7 @@ x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y) | |||
| 5647 | 5639 | ||
| 5648 | SetCursorPos (pt.x, pt.y); | 5640 | SetCursorPos (pt.x, pt.y); |
| 5649 | 5641 | ||
| 5650 | UNBLOCK_INPUT; | 5642 | unblock_input (); |
| 5651 | } | 5643 | } |
| 5652 | 5644 | ||
| 5653 | 5645 | ||
| @@ -5659,7 +5651,7 @@ x_focus_on_frame (struct frame *f) | |||
| 5659 | struct w32_display_info *dpyinfo = &one_w32_display_info; | 5651 | struct w32_display_info *dpyinfo = &one_w32_display_info; |
| 5660 | 5652 | ||
| 5661 | /* Give input focus to frame. */ | 5653 | /* Give input focus to frame. */ |
| 5662 | BLOCK_INPUT; | 5654 | block_input (); |
| 5663 | #if 0 | 5655 | #if 0 |
| 5664 | /* Try not to change its Z-order if possible. */ | 5656 | /* Try not to change its Z-order if possible. */ |
| 5665 | if (x_window_to_frame (dpyinfo, GetForegroundWindow ())) | 5657 | if (x_window_to_frame (dpyinfo, GetForegroundWindow ())) |
| @@ -5667,7 +5659,7 @@ x_focus_on_frame (struct frame *f) | |||
| 5667 | else | 5659 | else |
| 5668 | #endif | 5660 | #endif |
| 5669 | my_set_foreground_window (FRAME_W32_WINDOW (f)); | 5661 | my_set_foreground_window (FRAME_W32_WINDOW (f)); |
| 5670 | UNBLOCK_INPUT; | 5662 | unblock_input (); |
| 5671 | } | 5663 | } |
| 5672 | 5664 | ||
| 5673 | void | 5665 | void |
| @@ -5679,7 +5671,7 @@ x_unfocus_frame (struct frame *f) | |||
| 5679 | void | 5671 | void |
| 5680 | x_raise_frame (struct frame *f) | 5672 | x_raise_frame (struct frame *f) |
| 5681 | { | 5673 | { |
| 5682 | BLOCK_INPUT; | 5674 | block_input (); |
| 5683 | 5675 | ||
| 5684 | /* Strictly speaking, raise-frame should only change the frame's Z | 5676 | /* Strictly speaking, raise-frame should only change the frame's Z |
| 5685 | order, leaving input focus unchanged. This is reasonable behavior | 5677 | order, leaving input focus unchanged. This is reasonable behavior |
| @@ -5734,19 +5726,19 @@ x_raise_frame (struct frame *f) | |||
| 5734 | my_bring_window_to_top (FRAME_W32_WINDOW (f)); | 5726 | my_bring_window_to_top (FRAME_W32_WINDOW (f)); |
| 5735 | } | 5727 | } |
| 5736 | 5728 | ||
| 5737 | UNBLOCK_INPUT; | 5729 | unblock_input (); |
| 5738 | } | 5730 | } |
| 5739 | 5731 | ||
| 5740 | /* Lower frame F. */ | 5732 | /* Lower frame F. */ |
| 5741 | void | 5733 | void |
| 5742 | x_lower_frame (struct frame *f) | 5734 | x_lower_frame (struct frame *f) |
| 5743 | { | 5735 | { |
| 5744 | BLOCK_INPUT; | 5736 | block_input (); |
| 5745 | my_set_window_pos (FRAME_W32_WINDOW (f), | 5737 | my_set_window_pos (FRAME_W32_WINDOW (f), |
| 5746 | HWND_BOTTOM, | 5738 | HWND_BOTTOM, |
| 5747 | 0, 0, 0, 0, | 5739 | 0, 0, 0, 0, |
| 5748 | SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); | 5740 | SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); |
| 5749 | UNBLOCK_INPUT; | 5741 | unblock_input (); |
| 5750 | } | 5742 | } |
| 5751 | 5743 | ||
| 5752 | static void | 5744 | static void |
| @@ -5775,7 +5767,7 @@ x_make_frame_visible (struct frame *f) | |||
| 5775 | { | 5767 | { |
| 5776 | Lisp_Object type; | 5768 | Lisp_Object type; |
| 5777 | 5769 | ||
| 5778 | BLOCK_INPUT; | 5770 | block_input (); |
| 5779 | 5771 | ||
| 5780 | type = x_icon_type (f); | 5772 | type = x_icon_type (f); |
| 5781 | if (!NILP (type)) | 5773 | if (!NILP (type)) |
| @@ -5827,7 +5819,7 @@ x_make_frame_visible (struct frame *f) | |||
| 5827 | int count; | 5819 | int count; |
| 5828 | 5820 | ||
| 5829 | /* This must come after we set COUNT. */ | 5821 | /* This must come after we set COUNT. */ |
| 5830 | UNBLOCK_INPUT; | 5822 | unblock_input (); |
| 5831 | 5823 | ||
| 5832 | XSETFRAME (frame, f); | 5824 | XSETFRAME (frame, f); |
| 5833 | 5825 | ||
| @@ -5870,7 +5862,7 @@ x_make_frame_invisible (struct frame *f) | |||
| 5870 | if (FRAME_W32_DISPLAY_INFO (f)->x_highlight_frame == f) | 5862 | if (FRAME_W32_DISPLAY_INFO (f)->x_highlight_frame == f) |
| 5871 | FRAME_W32_DISPLAY_INFO (f)->x_highlight_frame = 0; | 5863 | FRAME_W32_DISPLAY_INFO (f)->x_highlight_frame = 0; |
| 5872 | 5864 | ||
| 5873 | BLOCK_INPUT; | 5865 | block_input (); |
| 5874 | 5866 | ||
| 5875 | my_show_window (f, FRAME_W32_WINDOW (f), SW_HIDE); | 5867 | my_show_window (f, FRAME_W32_WINDOW (f), SW_HIDE); |
| 5876 | 5868 | ||
| @@ -5884,7 +5876,7 @@ x_make_frame_invisible (struct frame *f) | |||
| 5884 | f->async_visible = 0; | 5876 | f->async_visible = 0; |
| 5885 | f->async_iconified = 0; | 5877 | f->async_iconified = 0; |
| 5886 | 5878 | ||
| 5887 | UNBLOCK_INPUT; | 5879 | unblock_input (); |
| 5888 | } | 5880 | } |
| 5889 | 5881 | ||
| 5890 | /* Change window state from mapped to iconified. */ | 5882 | /* Change window state from mapped to iconified. */ |
| @@ -5901,7 +5893,7 @@ x_iconify_frame (struct frame *f) | |||
| 5901 | if (f->async_iconified) | 5893 | if (f->async_iconified) |
| 5902 | return; | 5894 | return; |
| 5903 | 5895 | ||
| 5904 | BLOCK_INPUT; | 5896 | block_input (); |
| 5905 | 5897 | ||
| 5906 | type = x_icon_type (f); | 5898 | type = x_icon_type (f); |
| 5907 | if (!NILP (type)) | 5899 | if (!NILP (type)) |
| @@ -5910,7 +5902,7 @@ x_iconify_frame (struct frame *f) | |||
| 5910 | /* Simulate the user minimizing the frame. */ | 5902 | /* Simulate the user minimizing the frame. */ |
| 5911 | SendMessage (FRAME_W32_WINDOW (f), WM_SYSCOMMAND, SC_MINIMIZE, 0); | 5903 | SendMessage (FRAME_W32_WINDOW (f), WM_SYSCOMMAND, SC_MINIMIZE, 0); |
| 5912 | 5904 | ||
| 5913 | UNBLOCK_INPUT; | 5905 | unblock_input (); |
| 5914 | } | 5906 | } |
| 5915 | 5907 | ||
| 5916 | 5908 | ||
| @@ -5922,7 +5914,7 @@ x_free_frame_resources (struct frame *f) | |||
| 5922 | struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f); | 5914 | struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f); |
| 5923 | Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); | 5915 | Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); |
| 5924 | 5916 | ||
| 5925 | BLOCK_INPUT; | 5917 | block_input (); |
| 5926 | 5918 | ||
| 5927 | /* We must free faces before destroying windows because some | 5919 | /* We must free faces before destroying windows because some |
| 5928 | font-driver (e.g. xft) access a window while finishing a | 5920 | font-driver (e.g. xft) access a window while finishing a |
| @@ -5970,7 +5962,7 @@ x_free_frame_resources (struct frame *f) | |||
| 5970 | hlinfo->mouse_face_mouse_frame = 0; | 5962 | hlinfo->mouse_face_mouse_frame = 0; |
| 5971 | } | 5963 | } |
| 5972 | 5964 | ||
| 5973 | UNBLOCK_INPUT; | 5965 | unblock_input (); |
| 5974 | } | 5966 | } |
| 5975 | 5967 | ||
| 5976 | 5968 | ||
| @@ -5990,10 +5982,10 @@ x_destroy_window (struct frame *f) | |||
| 5990 | /* Set the normal size hints for the window manager, for frame F. | 5982 | /* Set the normal size hints for the window manager, for frame F. |
| 5991 | FLAGS is the flags word to use--or 0 meaning preserve the flags | 5983 | FLAGS is the flags word to use--or 0 meaning preserve the flags |
| 5992 | that the window now has. | 5984 | that the window now has. |
| 5993 | If USER_POSITION is nonzero, we set the USPosition | 5985 | If USER_POSITION, set the USPosition |
| 5994 | flag (this is useful when FLAGS is 0). */ | 5986 | flag (this is useful when FLAGS is 0). */ |
| 5995 | void | 5987 | void |
| 5996 | x_wm_set_size_hint (struct frame *f, long flags, int user_position) | 5988 | x_wm_set_size_hint (struct frame *f, long flags, bool user_position) |
| 5997 | { | 5989 | { |
| 5998 | Window window = FRAME_W32_WINDOW (f); | 5990 | Window window = FRAME_W32_WINDOW (f); |
| 5999 | 5991 | ||
| @@ -6254,10 +6246,10 @@ x_delete_terminal (struct terminal *terminal) | |||
| 6254 | if (!terminal->name) | 6246 | if (!terminal->name) |
| 6255 | return; | 6247 | return; |
| 6256 | 6248 | ||
| 6257 | BLOCK_INPUT; | 6249 | block_input (); |
| 6258 | 6250 | ||
| 6259 | x_delete_display (dpyinfo); | 6251 | x_delete_display (dpyinfo); |
| 6260 | UNBLOCK_INPUT; | 6252 | unblock_input (); |
| 6261 | } | 6253 | } |
| 6262 | 6254 | ||
| 6263 | struct w32_display_info * | 6255 | struct w32_display_info * |
| @@ -6267,7 +6259,7 @@ w32_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) | |||
| 6267 | struct terminal *terminal; | 6259 | struct terminal *terminal; |
| 6268 | HDC hdc; | 6260 | HDC hdc; |
| 6269 | 6261 | ||
| 6270 | BLOCK_INPUT; | 6262 | block_input (); |
| 6271 | 6263 | ||
| 6272 | if (!w32_initialized) | 6264 | if (!w32_initialized) |
| 6273 | { | 6265 | { |
| @@ -6329,7 +6321,7 @@ w32_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) | |||
| 6329 | init_sigio (connection); | 6321 | init_sigio (connection); |
| 6330 | #endif /* ! defined (SIGIO) */ | 6322 | #endif /* ! defined (SIGIO) */ |
| 6331 | 6323 | ||
| 6332 | UNBLOCK_INPUT; | 6324 | unblock_input (); |
| 6333 | 6325 | ||
| 6334 | return dpyinfo; | 6326 | return dpyinfo; |
| 6335 | } | 6327 | } |