mirror of
https://github.com/zen-browser/desktop.git
synced 2026-08-20 13:40:50 +00:00
34 lines
1.3 KiB
C++
34 lines
1.3 KiB
C++
From dd4460727998a53e9fa7372afba2a93a9546cec3 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= <emilio@crisal.io>
|
|
Date: Fri, 28 Nov 2025 15:06:26 +0000
|
|
Subject: [PATCH] Bug 2002986 - Use IAppWindowTitlebar::ResetToDefault() for
|
|
non-collapsed titlebar. r=win-reviewers,gstoll
|
|
|
|
This seems to actually go to the default DWM stuff and is the documented
|
|
way of doing so:
|
|
|
|
https://learn.microsoft.com/en-us/windows/apps/develop/title-bar#reset-the-title-bar
|
|
|
|
Differential Revision: https://phabricator.services.mozilla.com/D274413
|
|
---
|
|
widget/windows/WindowsUIUtils.cpp | 6 +++++-
|
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/widget/windows/WindowsUIUtils.cpp b/widget/windows/WindowsUIUtils.cpp
|
|
index a5a6c893e7056..abaabfba69dfa 100644
|
|
--- a/widget/windows/WindowsUIUtils.cpp
|
|
+++ b/widget/windows/WindowsUIUtils.cpp
|
|
@@ -1394,7 +1394,11 @@ void WindowsUIUtils::SetIsTitlebarCollapsed(HWND aWnd, bool aIsCollapsed) {
|
|
MOZ_ASSERT_UNREACHABLE("IAppWindowTitleBar could not be acquired");
|
|
return;
|
|
}
|
|
- hr = titleBar->put_ExtendsContentIntoTitleBar(aIsCollapsed);
|
|
+ if (aIsCollapsed) {
|
|
+ hr = titleBar->put_ExtendsContentIntoTitleBar(aIsCollapsed);
|
|
+ } else {
|
|
+ hr = titleBar->ResetToDefault();
|
|
+ }
|
|
if (FAILED(hr)) {
|
|
MOZ_LOG(gWindowsLog, LogLevel::Error,
|
|
("Skipping SetIsTitlebarCollapsed() because "
|