diff options
| author | Eli Zaretskii | 2013-03-14 19:37:51 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2013-03-14 19:37:51 +0200 |
| commit | a5cc4ddeb84fbdceff31af8d8df7036edebbc58d (patch) | |
| tree | 397d22a1f14aabfbf53c67f488963691abdc359c /src/w32term.c | |
| parent | d35f586402bb8545871f488b07032805310b8de2 (diff) | |
| download | emacs-a5cc4ddeb84fbdceff31af8d8df7036edebbc58d.tar.gz emacs-a5cc4ddeb84fbdceff31af8d8df7036edebbc58d.zip | |
Fix bug #13953 with spontaneous frame resizes on MS-Windows.
src/w32term.c (w32_read_socket) <WM_WINDOWPOSCHANGED>: Remove old
and incorrect code. Treat WM_WINDOWPOSCHANGED like WM_ACTIVATE
and WM_ACTIVATEAPP.
(w32fullscreen_hook): If the frame is visible, reset
f->want_fullscreen flag after changing the frame size. If the
frame is not visible, set f->want_fullscreen to FULLSCREEN_WAIT.
Diffstat (limited to 'src/w32term.c')
| -rw-r--r-- | src/w32term.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/src/w32term.c b/src/w32term.c index 680ad668ab3..6b51777839f 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -4705,26 +4705,20 @@ w32_read_socket (struct terminal *terminal, | |||
| 4705 | } | 4705 | } |
| 4706 | 4706 | ||
| 4707 | case WM_WINDOWPOSCHANGED: | 4707 | case WM_WINDOWPOSCHANGED: |
| 4708 | f = x_window_to_frame (dpyinfo, msg.msg.hwnd); | ||
| 4709 | if (f) | ||
| 4710 | { | ||
| 4711 | if (f->want_fullscreen & FULLSCREEN_WAIT) | ||
| 4712 | f->want_fullscreen &= ~(FULLSCREEN_WAIT|FULLSCREEN_BOTH); | ||
| 4713 | } | ||
| 4714 | check_visibility = 1; | ||
| 4715 | break; | ||
| 4716 | |||
| 4717 | case WM_ACTIVATE: | 4708 | case WM_ACTIVATE: |
| 4718 | case WM_ACTIVATEAPP: | 4709 | case WM_ACTIVATEAPP: |
| 4719 | f = x_window_to_frame (dpyinfo, msg.msg.hwnd); | 4710 | f = x_window_to_frame (dpyinfo, msg.msg.hwnd); |
| 4720 | if (f) | 4711 | if (f) |
| 4721 | { | 4712 | { |
| 4722 | /* If we are being activated, run the full-screen hook | 4713 | /* Run the full-screen hook function also when we are |
| 4723 | function, to actually install the required size in | 4714 | being activated, to actually install the required |
| 4724 | effect. This is because when the hook is run from | 4715 | size in effect, if the WAIT flag is set. This is |
| 4725 | x_set_fullscreen, the frame might not yet be visible, | 4716 | because when the hook is run from x_set_fullscreen, |
| 4726 | if that call is a result of make-frame. */ | 4717 | the frame might not yet be visible, if that call is a |
| 4727 | if (msg.msg.wParam) | 4718 | result of make-frame, and in that case the hook just |
| 4719 | sets the WAIT flag. */ | ||
| 4720 | if ((msg.msg.message == WM_WINDOWPOSCHANGED || msg.msg.wParam) | ||
| 4721 | && (f->want_fullscreen & FULLSCREEN_WAIT)) | ||
| 4728 | w32fullscreen_hook (f); | 4722 | w32fullscreen_hook (f); |
| 4729 | x_check_fullscreen (f); | 4723 | x_check_fullscreen (f); |
| 4730 | } | 4724 | } |
| @@ -5739,8 +5733,11 @@ w32fullscreen_hook (FRAME_PTR f) | |||
| 5739 | x_set_window_size (f, 1, width, height); | 5733 | x_set_window_size (f, 1, width, height); |
| 5740 | do_pending_window_change (0); | 5734 | do_pending_window_change (0); |
| 5741 | } | 5735 | } |
| 5736 | f->want_fullscreen = FULLSCREEN_NONE; | ||
| 5742 | unblock_input (); | 5737 | unblock_input (); |
| 5743 | } | 5738 | } |
| 5739 | else | ||
| 5740 | f->want_fullscreen |= FULLSCREEN_WAIT; | ||
| 5744 | } | 5741 | } |
| 5745 | 5742 | ||
| 5746 | /* Call this to change the size of frame F's x-window. | 5743 | /* Call this to change the size of frame F's x-window. |