Bug 1447297 - Set the cursor right before showing new windows to avoid showing the wait cursor during startup, r=jimm.
authorFlorian Quèze <florian@queze.net>
Wed, 21 Mar 2018 18:13:58 +0100
changeset 462852 57d72a8be27406668002e233fae25fc36a58514d
parent 462851 1fadea75f3630176098917eb3e085c57a42a793f
child 462853 7b367849bccf11447f6d7855837abf18d87210c2
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs1447297
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1447297 - Set the cursor right before showing new windows to avoid showing the wait cursor during startup, r=jimm.
widget/windows/nsWindow.cpp
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -1572,16 +1572,21 @@ nsWindow::Show(bool bState)
   }
 
   if (mWnd) {
     if (bState) {
       if (!wasVisible && mWindowType == eWindowType_toplevel) {
         // speed up the initial paint after show for
         // top level windows:
         syncInvalidate = true;
+
+        // Set the cursor before showing the window to avoid the default wait
+        // cursor.
+        SetCursor(eCursor_standard);
+
         switch (mSizeMode) {
           case nsSizeMode_Fullscreen:
             ::ShowWindow(mWnd, SW_SHOW);
             break;
           case nsSizeMode_Maximized :
             ::ShowWindow(mWnd, SW_SHOWMAXIMIZED);
             break;
           case nsSizeMode_Minimized :