From 14c6ddca6373d701ef156cb6d5f5008ccd06c83e Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 26 Jan 2020 14:39:40 +0000 Subject: [PATCH] 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! (cherry picked from commit 213723a718fdf874418eea734bf1016518830a71) --- windows/window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/windows/window.c b/windows/window.c index a17a9854..b5c730eb 100644 --- a/windows/window.c +++ b/windows/window.c @@ -2369,8 +2369,8 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, for (i = 0; i < lenof(popup_menus); i++) EnableMenuItem(popup_menus[i].menu, IDM_FULLSCREEN, MF_BYCOMMAND | - (resize_action == RESIZE_DISABLED) - ? MF_GRAYED : MF_ENABLED); + (resize_action == RESIZE_DISABLED + ? MF_GRAYED : MF_ENABLED)); /* Gracefully unzoom if necessary */ if (IsZoomed(hwnd) && (resize_action == RESIZE_DISABLED)) ShowWindow(hwnd, SW_RESTORE);