diff options
author | Eli Zaretskii <eliz@gnu.org> | 2013-01-23 18:52:05 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2013-01-23 18:52:05 +0200 |
commit | 54ab1c5acf892f07dd8121d4bbafe7601a54bcb5 (patch) | |
tree | 07e6fbf49b37c3d54a7f8dde0838a3f7dbb441ee /src | |
parent | 6c27465b7676fe6be837a38b2ea26846133acfa0 (diff) | |
download | emacs-54ab1c5acf892f07dd8121d4bbafe7601a54bcb5.tar.gz |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/w32term.c | 21 |
2 files changed, 20 insertions, 6 deletions
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 <eliz@gnu.org> + + * 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 <dmantipov@yandex.ru> * 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; |