Mercurial > vim
comparison src/gui_w32.c @ 6714:dc96dd80aef8 v7.4.681
updated for version 7.4.681
Problem: MS-Windows: When Vim is minimized the window height is computed
incorrectly.
Solution: When minimized use the previously computed size. (Ingo Karkat)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 24 Mar 2015 17:57:12 +0100 |
parents | 9f9058aeba0d |
children | 286fd54c7ae3 |
comparison
equal
deleted
inserted
replaced
6713:e544e57681f0 | 6714:dc96dd80aef8 |
---|---|
596 else | 596 else |
597 num = 0; | 597 num = 0; |
598 | 598 |
599 if (num == 0) | 599 if (num == 0) |
600 menu_height = 0; | 600 menu_height = 0; |
601 else if (IsMinimized(s_hwnd)) | |
602 { | |
603 /* The height of the menu cannot be determined while the window is | |
604 * minimized. Take the previous height if the menu is changed in that | |
605 * state, to avoid that Vim's vertical window size accidentally | |
606 * increases due to the unaccounted-for menu height. */ | |
607 menu_height = old_menu_height == -1 ? 0 : old_menu_height; | |
608 } | |
601 else | 609 else |
602 { | 610 { |
603 if (is_winnt_3()) /* for NT 3.xx */ | 611 if (is_winnt_3()) /* for NT 3.xx */ |
604 { | 612 { |
605 if (gui.starting) | 613 if (gui.starting) |
642 } | 650 } |
643 } | 651 } |
644 | 652 |
645 if (fix_window && menu_height != old_menu_height) | 653 if (fix_window && menu_height != old_menu_height) |
646 { | 654 { |
647 old_menu_height = menu_height; | |
648 gui_set_shellsize(FALSE, FALSE, RESIZE_VERT); | 655 gui_set_shellsize(FALSE, FALSE, RESIZE_VERT); |
649 } | 656 } |
657 old_menu_height = menu_height; | |
650 | 658 |
651 return menu_height; | 659 return menu_height; |
652 } | 660 } |
653 #endif /*FEAT_MENU*/ | 661 #endif /*FEAT_MENU*/ |
654 | 662 |