summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowwin32.cpp
diff options
context:
space:
mode:
authorRunitai Linden <davep@lindenlab.com>2021-12-17 09:27:19 -0600
committerRunitai Linden <davep@lindenlab.com>2021-12-17 09:27:19 -0600
commit92933b42522b37ad78fd714e8416681183d7d7f9 (patch)
tree3a859deda6047d28df3e2bd04c4299ca21c81495 /indra/llwindow/llwindowwin32.cpp
parentdd032467357a4aaf69c752c13e53122aff6c4755 (diff)
parent3ac21ebbf6b354e16ead2d095a61152c95a7243c (diff)
Merge branch 'DRTVWR-546' of ssh://bitbucket.org/lindenlab/viewer into DRTVWR-546
Diffstat (limited to 'indra/llwindow/llwindowwin32.cpp')
-rw-r--r--indra/llwindow/llwindowwin32.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 0064ee26d2..e4d771978a 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -427,6 +427,9 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
memset(mPrevGammaRamp, 0, sizeof(mPrevGammaRamp));
mCustomGammaSet = FALSE;
mWindowHandle = NULL;
+
+ mRect = {0, 0, 0, 0};
+ mClientRect = {0, 0, 0, 0};
if (!SystemParametersInfo(SPI_GETMOUSEVANISH, 0, &mMouseVanish, 0))
{
@@ -1506,6 +1509,16 @@ const S32 max_format = (S32)num_formats - 1;
}
recreateWindow(window_rect, dw_ex_style, dw_style);
+
+ RECT rect;
+ RECT client_rect;
+ //initialize immediately on main thread
+ if (GetWindowRect(mWindowHandle, &rect) &&
+ GetClientRect(mWindowHandle, &client_rect))
+ {
+ mRect = rect;
+ mClientRect = client_rect;
+ };
if (mWindowHandle)
{