From: Eli Zaretskii Date: Wed, 13 Mar 2013 17:31:06 +0000 (+0200) Subject: Fix bug #13937 with creating a maximized frame on MS-Windows. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2026^2~568^2~12 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c7ffccaf17d63cefd34bef0a9becc4e68df3b115;p=emacs.git Fix bug #13937 with creating a maximized frame on MS-Windows. src/w32term.c (w32_read_socket): If we Emacs frame is being activated, call w32fullscreen_hook, to make sure the new frame dimensions are in effect. --- diff --git a/src/ChangeLog b/src/ChangeLog index 6c575946b25..ae6fe86f661 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2013-03-13 Eli Zaretskii + + * w32term.c (w32_read_socket): If we Emacs frame is being + activated, call w32fullscreen_hook, to make sure the new frame + dimensions are in effect. (Bug#13937) + 2013-03-13 Dmitry Antipov * xdisp.c (init_iterator): Simplify because both character and byte diff --git a/src/w32term.c b/src/w32term.c index 6137d54c837..680ad668ab3 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -236,6 +236,7 @@ static void my_set_focus (struct frame *, HWND); #endif static void my_set_foreground_window (HWND); static void my_destroy_window (struct frame *, HWND); +static void w32fullscreen_hook (FRAME_PTR); #ifdef GLYPH_DEBUG static void x_check_font (struct frame *, struct font *); @@ -4717,7 +4718,16 @@ w32_read_socket (struct terminal *terminal, case WM_ACTIVATEAPP: f = x_window_to_frame (dpyinfo, msg.msg.hwnd); if (f) - x_check_fullscreen (f); + { + /* If we are being activated, run the full-screen hook + function, to actually install the required size in + effect. This is because when the hook is run from + x_set_fullscreen, the frame might not yet be visible, + if that call is a result of make-frame. */ + if (msg.msg.wParam) + w32fullscreen_hook (f); + x_check_fullscreen (f); + } check_visibility = 1; break;