From f91e12d593e330d37e9942fa29b21fa262be5c25 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Sun, 8 Dec 2024 10:55:14 +0100 Subject: [PATCH] fix: improve handling of system menu in full screen mode --- src/widget/windows/nsWindow-cpp.patch | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/widget/windows/nsWindow-cpp.patch b/src/widget/windows/nsWindow-cpp.patch index 4f4fb894..2a51fb83 100644 --- a/src/widget/windows/nsWindow-cpp.patch +++ b/src/widget/windows/nsWindow-cpp.patch @@ -1,5 +1,5 @@ diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp -index 00681c216c838efedbbcded9d6b843dbd8b5b0b6..87ac5b6505c51ad9480b2edb37360aff600f2712 100644 +index 00681c216c838efedbbcded9d6b843dbd8b5b0b6..f07e6e723596d84fb53a8a72b06e02cd4ace6bc1 100644 --- a/widget/windows/nsWindow.cpp +++ b/widget/windows/nsWindow.cpp @@ -2729,12 +2729,37 @@ nsresult nsWindow::SetNonClientMargins(const LayoutDeviceIntMargin& margins) { @@ -146,7 +146,7 @@ index 00681c216c838efedbbcded9d6b843dbd8b5b0b6..87ac5b6505c51ad9480b2edb37360aff } // The WndProc procedure for all nsWindows in this toolkit. This merely catches -@@ -5768,14 +5795,20 @@ bool nsWindow::ProcessMessageInternal(UINT msg, WPARAM& wParam, LPARAM& lParam, +@@ -5768,13 +5795,20 @@ bool nsWindow::ProcessMessageInternal(UINT msg, WPARAM& wParam, LPARAM& lParam, result = true; } @@ -157,7 +157,6 @@ index 00681c216c838efedbbcded9d6b843dbd8b5b0b6..87ac5b6505c51ad9480b2edb37360aff - DisplaySystemMenu(mWnd, mFrameState->GetSizeMode(), mIsRTL, - MOZ_SYSCONTEXT_X_POS, MOZ_SYSCONTEXT_Y_POS); - result = true; -- } + if (filteredWParam == SC_KEYMENU && lParam == VK_SPACE) { + const auto sizeMode = mFrameState->GetSizeMode(); + // Handle the system menu manually when we're in full screen mode or @@ -172,6 +171,6 @@ index 00681c216c838efedbbcded9d6b843dbd8b5b0b6..87ac5b6505c51ad9480b2edb37360aff + DisplaySystemMenu(mWnd, sizeMode, mIsRTL, pos.x, pos.y); + result = true; + } + } } break; - case WM_DPICHANGED: {