mirror of
https://github.com/zen-browser/desktop.git
synced 2026-01-13 16:45:31 +00:00
fix: correct window handle usage to remove titlebar control buttons
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp
|
||||
index 00681c216c838efedbbcded9d6b843dbd8b5b0b6..e40203bc4557acbf014e7a5d16ca35fad7b57ca0 100644
|
||||
index 00681c216c838efedbbcded9d6b843dbd8b5b0b6..49180ec513155ce262a8928566fc7938ba4a201c 100644
|
||||
--- a/widget/windows/nsWindow.cpp
|
||||
+++ b/widget/windows/nsWindow.cpp
|
||||
@@ -1078,6 +1078,14 @@ nsresult nsWindow::Create(nsIWidget* aParent, const LayoutDeviceIntRect& aRect,
|
||||
@@ -11,9 +11,9 @@ index 00681c216c838efedbbcded9d6b843dbd8b5b0b6..e40203bc4557acbf014e7a5d16ca35fa
|
||||
+ // Windows creates some sort of control buttons under the titlebar, which is
|
||||
+ // annoying for us because it wont allow us to have those hiding animations.
|
||||
+ // Let's just... remove them... and hope for the best.
|
||||
+ LONG_PTR style = ::GetWindowLongPtr(hwnd, GWL_STYLE);
|
||||
+ LONG_PTR style = ::GetWindowLongPtr(mWnd, GWL_STYLE);
|
||||
+ style &= ~(kTitlebarItemsWindowStyles);
|
||||
+ ::SetWindowLongPtr(hwnd, GWL_STYLE, style);
|
||||
+ ::SetWindowLongPtr(mWnd, GWL_STYLE, style);
|
||||
}
|
||||
|
||||
if (mOpeningAnimationSuppressed) {
|
||||
|
||||
Reference in New Issue
Block a user