Fix misplaced parens in window.c.

This was pointed out as a compiler warning when I test-built with
up-to-date clang-cl. It looks as if it would cause the IDM_FULLSCREEN
item on the system menu to be wrongly greyed/ungreyed, but in fact I
think it's benign, because MF_BYCOMMAND == 0. So it's _just_ a
warning fix, luckily!
This commit is contained in:
Simon Tatham 2020-01-26 14:39:40 +00:00
Родитель 82a7e8c4ac
Коммит 213723a718
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -2344,8 +2344,8 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
for (i = 0; i < lenof(popup_menus); i++) for (i = 0; i < lenof(popup_menus); i++)
EnableMenuItem(popup_menus[i].menu, IDM_FULLSCREEN, EnableMenuItem(popup_menus[i].menu, IDM_FULLSCREEN,
MF_BYCOMMAND | MF_BYCOMMAND |
(resize_action == RESIZE_DISABLED) (resize_action == RESIZE_DISABLED
? MF_GRAYED : MF_ENABLED); ? MF_GRAYED : MF_ENABLED));
/* Gracefully unzoom if necessary */ /* Gracefully unzoom if necessary */
if (IsZoomed(hwnd) && (resize_action == RESIZE_DISABLED)) if (IsZoomed(hwnd) && (resize_action == RESIZE_DISABLED))
ShowWindow(hwnd, SW_RESTORE); ShowWindow(hwnd, SW_RESTORE);