Files
desktop/src/widget/windows/nsWindow-cpp.patch
2024-12-05 22:16:17 +01:00

20 lines
1.0 KiB
C++

diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp
index 00681c216c838efedbbcded9d6b843dbd8b5b0b6..e40203bc4557acbf014e7a5d16ca35fad7b57ca0 100644
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -1078,6 +1078,14 @@ nsresult nsWindow::Create(nsIWidget* aParent, const LayoutDeviceIntRect& aRect,
const DWM_SYSTEMBACKDROP_TYPE tabbedWindow = DWMSBT_TABBEDWINDOW;
DwmSetWindowAttribute(mWnd, DWMWA_SYSTEMBACKDROP_TYPE, &tabbedWindow,
sizeof tabbedWindow);
+
+ // If someone wants to make a patch to firefox, im fine with it. Im tired, boss.
+ // 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);
+ style &= ~(kTitlebarItemsWindowStyles);
+ ::SetWindowLongPtr(hwnd, GWL_STYLE, style);
}
if (mOpeningAnimationSuppressed) {