mirror of
https://github.com/zen-browser/desktop.git
synced 2026-01-10 15:23:57 +00:00
chore: Revert applying patches from bug_1993474, b=no-bug, c=no-component
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp
|
||||
index 2a17159215d107f6e4b09cf3a63ab0fff2c2ee70..622bb36a184a87a1d755b19ff6c3c50027ae53f5 100644
|
||||
--- a/widget/windows/nsWindow.cpp
|
||||
+++ b/widget/windows/nsWindow.cpp
|
||||
@@ -2848,6 +2848,25 @@ void nsWindow::SetCustomTitlebar(bool aCustomTitlebar) {
|
||||
|
||||
mCustomNonClient = aCustomTitlebar;
|
||||
|
||||
+ // Because of bug 1993474, we want to properly set the WS_BORDER style
|
||||
+ // when the titlebar is turned on or off.
|
||||
+ //
|
||||
+ // The documentation for window styles says that most styles can't be
|
||||
+ // modified after the window is created. Testing shows that WS_BORDER
|
||||
+ // seems to be OK, but make sure this is the only style we try to change
|
||||
+ // here.
|
||||
+ const LONG_PTR actualStyle = ::GetWindowLongPtrW(mWnd, GWL_STYLE);
|
||||
+ LONG_PTR newStyle = actualStyle;
|
||||
+ if (mCustomNonClient) {
|
||||
+ newStyle &= ~WS_BORDER;
|
||||
+ } else {
|
||||
+ newStyle |= WS_BORDER;
|
||||
+ }
|
||||
+ if (newStyle != actualStyle) {
|
||||
+ VERIFY_WINDOW_STYLE(newStyle);
|
||||
+ ::SetWindowLongPtrW(mWnd, GWL_STYLE, newStyle);
|
||||
+ }
|
||||
+
|
||||
// Force a reflow of content based on the new client dimensions.
|
||||
if (mCustomNonClient) {
|
||||
UpdateNonClientMargins();
|
||||
Reference in New Issue
Block a user