From 14f5c792298ed13596c8f55da5f44a567519ef59 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Thu, 5 Dec 2024 23:40:59 +0100 Subject: [PATCH] fix: correct window handle usage to remove titlebar control buttons --- src/widget/windows/nsWindow-cpp.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/widget/windows/nsWindow-cpp.patch b/src/widget/windows/nsWindow-cpp.patch index a4e642b7d..821c2758a 100644 --- a/src/widget/windows/nsWindow-cpp.patch +++ b/src/widget/windows/nsWindow-cpp.patch @@ -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) {