From ce7682c2a468e926d6b38e4f95bd289a8d26222c Mon Sep 17 00:00:00 2001 From: Bryan O'Sullivan Date: Wed, 18 Jul 2007 21:22:40 +0000 Subject: svn merge -r64837:65485 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance --> release (only inside indra) (josh) Original log message was: svn merge -r64837:65485 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance bos updated it to be: svn merge -r64837:65269 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance However, it appears it actually was: svn merge -r64837:65485 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance ... missing some file additions. --- indra/llwindow/llwindowwin32.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'indra/llwindow') 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) -- cgit v1.2.3