fix: improve handling of system menu in full screen mode

This commit is contained in:
mr. M
2024-12-08 10:55:14 +01:00
parent 484b828f9d
commit f91e12d593

View File

@@ -1,5 +1,5 @@
diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp 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 --- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp +++ b/widget/windows/nsWindow.cpp
@@ -2729,12 +2729,37 @@ nsresult nsWindow::SetNonClientMargins(const LayoutDeviceIntMargin& margins) { @@ -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 // 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; result = true;
} }
@@ -157,7 +157,6 @@ index 00681c216c838efedbbcded9d6b843dbd8b5b0b6..87ac5b6505c51ad9480b2edb37360aff
- DisplaySystemMenu(mWnd, mFrameState->GetSizeMode(), mIsRTL, - DisplaySystemMenu(mWnd, mFrameState->GetSizeMode(), mIsRTL,
- MOZ_SYSCONTEXT_X_POS, MOZ_SYSCONTEXT_Y_POS); - MOZ_SYSCONTEXT_X_POS, MOZ_SYSCONTEXT_Y_POS);
- result = true; - result = true;
- }
+ if (filteredWParam == SC_KEYMENU && lParam == VK_SPACE) { + if (filteredWParam == SC_KEYMENU && lParam == VK_SPACE) {
+ const auto sizeMode = mFrameState->GetSizeMode(); + const auto sizeMode = mFrameState->GetSizeMode();
+ // Handle the system menu manually when we're in full screen mode or + // 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); + DisplaySystemMenu(mWnd, sizeMode, mIsRTL, pos.x, pos.y);
+ result = true; + result = true;
+ } + }
}
} break; } break;
case WM_DPICHANGED: {