From: Eli Zaretskii Date: Wed, 23 Jan 2013 16:52:05 +0000 (+0200) Subject: Fix dimensions of maximized frame on MS-Windows. X-Git-Tag: emacs-24.3.90~173^2~7^2~232 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=54ab1c5acf892f07dd8121d4bbafe7601a54bcb5;p=emacs.git Fix dimensions of maximized frame on MS-Windows. src/w32term.c (w32fullscreen_hook): Account correctly for the screen real estate used for the tool bar, the menu bar, and scroll bar. --- diff --git a/src/ChangeLog b/src/ChangeLog index 67b63eb1fdb..644724f67b6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2013-01-23 Eli Zaretskii + + * w32term.c (w32fullscreen_hook): Account correctly for the screen + real estate used for the tool bar and the menu bar. + 2013-01-23 Dmitry Antipov * insdel.c (prepare_to_modify_buffer): Force redisplay if diff --git a/src/w32term.c b/src/w32term.c index 16c7bd415a5..0cb2effcda1 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -5674,24 +5674,33 @@ w32fullscreen_hook (FRAME_PTR f) switch (f->want_fullscreen) { - /* No difference between these two when there is no WM */ case FULLSCREEN_MAXIMIZED: - PostMessage (FRAME_W32_WINDOW (f), WM_SYSCOMMAND, 0xf030, 0); + PostMessage (FRAME_W32_WINDOW (f), WM_SYSCOMMAND, SC_MAXIMIZE, 0); break; case FULLSCREEN_BOTH: - height = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, pixel_height) - 2; - width = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, pixel_width); + height = + FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, pixel_height) + - XINT (Ftool_bar_lines_needed (selected_frame)) + + (NILP (Vmenu_bar_mode) ? 1 : 0); + width = + FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, pixel_width) + - FRAME_SCROLL_BAR_COLS (f); left_pos = workarea_rect.left; top_pos = workarea_rect.top; break; case FULLSCREEN_WIDTH: - width = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, pixel_width); + width = + FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, pixel_width) + - FRAME_SCROLL_BAR_COLS (f); if (normal_height > 0) height = normal_height; left_pos = workarea_rect.left; break; case FULLSCREEN_HEIGHT: - height = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, pixel_height) - 2; + height = + FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, pixel_height) + - XINT (Ftool_bar_lines_needed (selected_frame)) + + (NILP (Vmenu_bar_mode) ? 1 : 0); if (normal_width > 0) width = normal_width; top_pos = workarea_rect.top;