summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowwin32.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llwindow/llwindowwin32.cpp')
-rw-r--r--indra/llwindow/llwindowwin32.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index afa78984ea..299ccc39f3 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -1565,6 +1565,11 @@ void LLWindowWin32::moveWindow( const LLCoordScreen& position, const LLCoordScre
}
}
+ // if the window was already maximized, MoveWindow seems to still set the maximized flag even if
+ // the window is smaller than maximized.
+ // So we're going to do a restore first (which is a ShowWindow call) (SL-44655).
+ ShowWindow(mWindowHandle, SW_RESTORE);
+ // NOW we can call MoveWindow
MoveWindow(mWindowHandle, position.mX, position.mY, size.mX, size.mY, TRUE);
}
@@ -2269,6 +2274,13 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
<< llendl;
}
+ // There's an odd behavior with WM_SIZE that I would call a bug. If
+ // the window is maximized, and you call MoveWindow() with a size smaller
+ // than a maximized window, it ends up sending WM_SIZE with w_param set
+ // to SIZE_MAXIMIZED -- which isn't true. So the logic below doesn't work.
+ // (SL-44655). Fixed it by calling ShowWindow(SW_RESTORE) first (see
+ // LLWindowWin32::moveWindow in this file).
+
// If we are now restored, but we weren't before, this
// means that the window was un-minimized.
if (w_param == SIZE_RESTORED && window_imp->mLastSizeWParam != SIZE_RESTORED)