diff options
| author | Karl Heuer | 1999-06-12 03:44:31 +0000 |
|---|---|---|
| committer | Karl Heuer | 1999-06-12 03:44:31 +0000 |
| commit | 31d4844a6a48c8122021faeb1a69a939d7f3cb76 (patch) | |
| tree | 1929a14cc6edd641dabb847baf8413cdaae48cf8 /src | |
| parent | 318f417cd31e7d2b0dcedcb4d63297bfb582b71f (diff) | |
| download | emacs-31d4844a6a48c8122021faeb1a69a939d7f3cb76.tar.gz emacs-31d4844a6a48c8122021faeb1a69a939d7f3cb76.zip | |
(cancel_mouse_face): new function. See equiv
changes to xterm.c on 1996-10-31.
(x_set_window_size): use cancel_mouse_face.
(w32_read_socket): use cancel_mouse_face.
Update frame position when size is restored.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32term.c | 43 |
1 files changed, 33 insertions, 10 deletions
diff --git a/src/w32term.c b/src/w32term.c index 67d57927bca..1d094708e3f 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -2436,6 +2436,25 @@ clear_mouse_face (dpyinfo) | |||
| 2436 | dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1; | 2436 | dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1; |
| 2437 | dpyinfo->mouse_face_window = Qnil; | 2437 | dpyinfo->mouse_face_window = Qnil; |
| 2438 | } | 2438 | } |
| 2439 | |||
| 2440 | /* Just discard the mouse face information for frame F, if any. | ||
| 2441 | This is used when the size of F is changed. */ | ||
| 2442 | |||
| 2443 | void | ||
| 2444 | cancel_mouse_face (f) | ||
| 2445 | FRAME_PTR f; | ||
| 2446 | { | ||
| 2447 | Lisp_Object window; | ||
| 2448 | struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f); | ||
| 2449 | |||
| 2450 | window = dpyinfo->mouse_face_window; | ||
| 2451 | if (! NILP (window) && XFRAME (XWINDOW (window)->frame) == f) | ||
| 2452 | { | ||
| 2453 | dpyinfo->mouse_face_beg_row = dpyinfo->mouse_face_beg_col = -1; | ||
| 2454 | dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1; | ||
| 2455 | dpyinfo->mouse_face_window = Qnil; | ||
| 2456 | } | ||
| 2457 | } | ||
| 2439 | 2458 | ||
| 2440 | struct scroll_bar *x_window_to_scroll_bar (); | 2459 | struct scroll_bar *x_window_to_scroll_bar (); |
| 2441 | static void x_scroll_bar_report_motion (); | 2460 | static void x_scroll_bar_report_motion (); |
| @@ -3698,6 +3717,17 @@ w32_read_socket (sd, bufp, numchars, expected) | |||
| 3698 | 3717 | ||
| 3699 | if (f->iconified) | 3718 | if (f->iconified) |
| 3700 | { | 3719 | { |
| 3720 | int x, y; | ||
| 3721 | |||
| 3722 | /* Reset top and left positions of the Window | ||
| 3723 | here since Windows sends a WM_MOVE message | ||
| 3724 | BEFORE telling us the Window is minimized | ||
| 3725 | when the Window is iconified, with 3000,3000 | ||
| 3726 | as the co-ords. */ | ||
| 3727 | x_real_positions (f, &x, &y); | ||
| 3728 | f->output_data.w32->left_pos = x; | ||
| 3729 | f->output_data.w32->top_pos = y; | ||
| 3730 | |||
| 3701 | bufp->kind = deiconify_event; | 3731 | bufp->kind = deiconify_event; |
| 3702 | XSETFRAME (bufp->frame_or_window, f); | 3732 | XSETFRAME (bufp->frame_or_window, f); |
| 3703 | bufp++; | 3733 | bufp++; |
| @@ -3744,7 +3774,7 @@ w32_read_socket (sd, bufp, numchars, expected) | |||
| 3744 | 3774 | ||
| 3745 | change_frame_size (f, rows, columns, 0, 1); | 3775 | change_frame_size (f, rows, columns, 0, 1); |
| 3746 | SET_FRAME_GARBAGED (f); | 3776 | SET_FRAME_GARBAGED (f); |
| 3747 | 3777 | cancel_mouse_face (f); | |
| 3748 | f->output_data.w32->pixel_width = width; | 3778 | f->output_data.w32->pixel_width = width; |
| 3749 | f->output_data.w32->pixel_height = height; | 3779 | f->output_data.w32->pixel_height = height; |
| 3750 | f->output_data.w32->win_gravity = NorthWestGravity; | 3780 | f->output_data.w32->win_gravity = NorthWestGravity; |
| @@ -4387,7 +4417,6 @@ x_set_window_size (f, change_gravity, cols, rows) | |||
| 4387 | int cols, rows; | 4417 | int cols, rows; |
| 4388 | { | 4418 | { |
| 4389 | int pixelwidth, pixelheight; | 4419 | int pixelwidth, pixelheight; |
| 4390 | Lisp_Object window; | ||
| 4391 | struct w32_display_info *dpyinfo = &one_w32_display_info; | 4420 | struct w32_display_info *dpyinfo = &one_w32_display_info; |
| 4392 | 4421 | ||
| 4393 | BLOCK_INPUT; | 4422 | BLOCK_INPUT; |
| @@ -4456,14 +4485,8 @@ x_set_window_size (f, change_gravity, cols, rows) | |||
| 4456 | since it might be in a place that's outside the new frame size. | 4485 | since it might be in a place that's outside the new frame size. |
| 4457 | Actually checking whether it is outside is a pain in the neck, | 4486 | Actually checking whether it is outside is a pain in the neck, |
| 4458 | so don't try--just let the highlighting be done afresh with new size. */ | 4487 | so don't try--just let the highlighting be done afresh with new size. */ |
| 4459 | window = dpyinfo->mouse_face_window; | 4488 | cancel_mouse_face (f); |
| 4460 | if (! NILP (window) && XFRAME (window) == f) | 4489 | |
| 4461 | { | ||
| 4462 | dpyinfo->mouse_face_beg_row = dpyinfo->mouse_face_beg_col = -1; | ||
| 4463 | dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1; | ||
| 4464 | dpyinfo->mouse_face_window = Qnil; | ||
| 4465 | } | ||
| 4466 | |||
| 4467 | UNBLOCK_INPUT; | 4490 | UNBLOCK_INPUT; |
| 4468 | } | 4491 | } |
| 4469 | 4492 | ||