mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-21 22:28:37 -05:00
Keep the state of the "Full Screen" menu item on the Ctrl+right-click context
menu in sync with reality and the system menu. [originally from svn r8620]
This commit is contained in:
parent
c35eff9213
commit
bfacfe29a5
@ -2112,10 +2112,12 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
|
|||||||
|
|
||||||
{
|
{
|
||||||
/* Disable full-screen if resizing forbidden */
|
/* Disable full-screen if resizing forbidden */
|
||||||
HMENU m = GetSystemMenu (hwnd, FALSE);
|
int i;
|
||||||
EnableMenuItem(m, IDM_FULLSCREEN, MF_BYCOMMAND |
|
for (i = 0; i < lenof(popup_menus); i++)
|
||||||
(cfg.resize_action == RESIZE_DISABLED)
|
EnableMenuItem(popup_menus[i].menu, IDM_FULLSCREEN,
|
||||||
? MF_GRAYED : MF_ENABLED);
|
MF_BYCOMMAND |
|
||||||
|
(cfg.resize_action == RESIZE_DISABLED)
|
||||||
|
? MF_GRAYED : MF_ENABLED);
|
||||||
/* Gracefully unzoom if necessary */
|
/* Gracefully unzoom if necessary */
|
||||||
if (IsZoomed(hwnd) &&
|
if (IsZoomed(hwnd) &&
|
||||||
(cfg.resize_action == RESIZE_DISABLED)) {
|
(cfg.resize_action == RESIZE_DISABLED)) {
|
||||||
@ -5370,9 +5372,12 @@ static void make_full_screen()
|
|||||||
|
|
||||||
reset_window(0);
|
reset_window(0);
|
||||||
|
|
||||||
/* Tick the menu item in the System menu. */
|
/* Tick the menu item in the System and context menus. */
|
||||||
CheckMenuItem(GetSystemMenu(hwnd, FALSE), IDM_FULLSCREEN,
|
{
|
||||||
MF_CHECKED);
|
int i;
|
||||||
|
for (i = 0; i < lenof(popup_menus); i++)
|
||||||
|
CheckMenuItem(popup_menus[i].menu, IDM_FULLSCREEN, MF_CHECKED);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -5400,9 +5405,12 @@ static void clear_full_screen()
|
|||||||
SWP_FRAMECHANGED);
|
SWP_FRAMECHANGED);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Untick the menu item in the System menu. */
|
/* Untick the menu item in the System and context menus. */
|
||||||
CheckMenuItem(GetSystemMenu(hwnd, FALSE), IDM_FULLSCREEN,
|
{
|
||||||
MF_UNCHECKED);
|
int i;
|
||||||
|
for (i = 0; i < lenof(popup_menus); i++)
|
||||||
|
CheckMenuItem(popup_menus[i].menu, IDM_FULLSCREEN, MF_UNCHECKED);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user