This is an automated email from the git hooks/post-receive script.
pierov pushed a commit to branch geckoview-99.0.1-11.0-1 in repository tor-browser.
commit 58350a02fccb2969b2edb6f9d463b9c95bae5fbe Author: donal meehan dmeehan@mozilla.com AuthorDate: Fri Mar 25 09:09:29 2022 -0400
Backed out changeset c598a609660e (bug 1758357) for causing bug 1761408 --- widget/windows/nsWindow.cpp | 7 +++---- widget/windows/nsWindow.h | 1 + 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp index 6ec40095e3990..69abb58ef4f53 100644 --- a/widget/windows/nsWindow.cpp +++ b/widget/windows/nsWindow.cpp @@ -259,6 +259,7 @@ bool nsWindow::sDropShadowEnabled = true; uint32_t nsWindow::sInstanceCount = 0; bool nsWindow::sSwitchKeyboardLayout = false; BOOL nsWindow::sIsOleInitialized = FALSE; +HCURSOR nsWindow::sCustomHCursor = nullptr; nsIWidget::Cursor nsWindow::sCurrentCursor = {}; nsWindow* nsWindow::sCurrentWindow = nullptr; bool nsWindow::sJustGotDeactivate = false; @@ -3243,15 +3244,13 @@ static HCURSOR CursorForImage(const nsIWidget::Cursor& aCursor,
// Setting the actual cursor void nsWindow::SetCursor(const Cursor& aCursor) { - static HCURSOR sCustomHCursor = nullptr; - mCursor = aCursor;
- if (!mUpdateCursor && sCurrentCursor == aCursor) { + if (sCurrentCursor == aCursor && sCustomHCursor) { + ::SetCursor(sCustomHCursor); return; }
- mUpdateCursor = false; if (sCustomHCursor) { ::DestroyIcon(sCustomHCursor); sCustomHCursor = nullptr; diff --git a/widget/windows/nsWindow.h b/widget/windows/nsWindow.h index ffbdaf0fe1f00..f757e9c27650a 100644 --- a/widget/windows/nsWindow.h +++ b/widget/windows/nsWindow.h @@ -667,6 +667,7 @@ class nsWindow final : public nsBaseWidget { static TriStateBool sCanQuit; static nsWindow* sCurrentWindow; static BOOL sIsOleInitialized; + static HCURSOR sCustomHCursor; static Cursor sCurrentCursor; static bool sSwitchKeyboardLayout; static bool sJustGotDeactivate;