mirror of
https://github.com/zen-browser/desktop.git
synced 2026-01-07 05:43:21 +00:00
Added support for acrylic backgrounds for windows 11 with mica support
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml
|
||||
index 5c5992d7b32e4c16d6a92815ca6fd54e8fcec824..6c8e67e36f02b578c800fa460868135afb73c66b 100644
|
||||
index 7364514f74703184462e8dbce3f0aafc3f850a3d..560671beddf6c216e918a47bd5dbd4e770a24ec7 100644
|
||||
--- a/modules/libpref/init/StaticPrefList.yaml
|
||||
+++ b/modules/libpref/init/StaticPrefList.yaml
|
||||
@@ -17810,7 +17810,7 @@
|
||||
@@ -18067,7 +18067,7 @@
|
||||
# Whether we use the mica backdrop. Off by default for now.
|
||||
- name: widget.windows.mica
|
||||
type: bool
|
||||
@@ -11,7 +11,7 @@ index 5c5992d7b32e4c16d6a92815ca6fd54e8fcec824..6c8e67e36f02b578c800fa460868135a
|
||||
mirror: once
|
||||
#endif
|
||||
|
||||
@@ -17923,6 +17923,19 @@
|
||||
@@ -18180,6 +18180,26 @@
|
||||
mirror: always
|
||||
#endif
|
||||
|
||||
@@ -27,6 +27,13 @@ index 5c5992d7b32e4c16d6a92815ca6fd54e8fcec824..6c8e67e36f02b578c800fa460868135a
|
||||
+ value: false
|
||||
+ mirror: always
|
||||
+#endif
|
||||
+
|
||||
+#ifdef XP_WIN
|
||||
+- name: zen.widget.windows.acrylic
|
||||
+ type: bool
|
||||
+ value: true
|
||||
+ mirror: once
|
||||
+#endif
|
||||
+
|
||||
#---------------------------------------------------------------------------
|
||||
# Prefs starting with "zoom."
|
||||
|
||||
21
src/widget/windows/nsWindow-cpp.patch
Normal file
21
src/widget/windows/nsWindow-cpp.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp
|
||||
index b735e78b1c2f3e0d85a5224311cdc746007c7eac..50f3c6e40b11220b71a8a3811305661887bb4360 100644
|
||||
--- a/widget/windows/nsWindow.cpp
|
||||
+++ b/widget/windows/nsWindow.cpp
|
||||
@@ -165,6 +165,7 @@
|
||||
#include "mozilla/StaticPrefs_layout.h"
|
||||
#include "mozilla/StaticPrefs_ui.h"
|
||||
#include "mozilla/StaticPrefs_widget.h"
|
||||
+#include "mozilla/StaticPrefs_zen.h"
|
||||
#include "nsNativeAppSupportWin.h"
|
||||
|
||||
#include "nsIGfxInfo.h"
|
||||
@@ -1071,7 +1072,7 @@ nsresult nsWindow::Create(nsIWidget* aParent, const LayoutDeviceIntRect& aRect,
|
||||
|
||||
if (WinUtils::MicaEnabled() && !IsPopup()) {
|
||||
// Enable Mica Alt Material if available.
|
||||
- const DWM_SYSTEMBACKDROP_TYPE tabbedWindow = DWMSBT_TABBEDWINDOW;
|
||||
+ const DWM_SYSTEMBACKDROP_TYPE tabbedWindow = StaticPrefs::zen_widget_windows_acrylic_AtStartup() ? DWMSBT_TRANSIENTWINDOW : DWMSBT_TABBEDWINDOW;
|
||||
DwmSetWindowAttribute(mWnd, DWMWA_SYSTEMBACKDROP_TYPE, &tabbedWindow,
|
||||
sizeof tabbedWindow);
|
||||
}
|
||||
Reference in New Issue
Block a user