Skip to content

Commit 04dd049

Browse files
committed
revert later: workaround to force full-screen for profiling
1 parent 60d3e7a commit 04dd049

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

src/nbl/ui/CWindowManagerWin32.cpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,14 +166,16 @@ void CWindowManagerWin32::SRequestParams_CreateWindow::operator()(core::StorageT
166166

167167
RegisterClassExA(&wcex);
168168
// calculate client size
169-
169+
int cxx = GetSystemMetrics(SM_CXSCREEN);
170+
int cyy = GetSystemMetrics(SM_CYSCREEN);
170171
RECT clientSize;
172+
y = 0; x = 0;
171173
clientSize.top = y;
172174
clientSize.left = x;
173-
clientSize.right = clientSize.left + width;
174-
clientSize.bottom = clientSize.top + height;
175+
clientSize.right = clientSize.left + cxx;
176+
clientSize.bottom = clientSize.top + cyy;
175177

176-
const DWORD style = getWindowStyle(flags);
178+
const DWORD style = WS_POPUP;// | WS_EX_TOPMOST | WS_MAXIMIZE;
177179

178180
// TODO:
179181
// if (hasMouseCaptured())
@@ -194,13 +196,15 @@ void CWindowManagerWin32::SRequestParams_CreateWindow::operator()(core::StorageT
194196

195197
//
196198
if (!flags.hasFlags(CWindowWin32::ECF_HIDDEN))
197-
ShowWindow(nativeWindow, SW_SHOWNORMAL);
199+
ShowWindow(nativeWindow, SW_SHOWMAXIMIZED);
198200
UpdateWindow(nativeWindow);
199201

200202
// fix ugly ATI driver bugs. Thanks to ariaci
201203
// TODO still needed?
202-
MoveWindow(nativeWindow, clientSize.left, clientSize.top, realWidth, realHeight, TRUE);
204+
//MoveWindow(nativeWindow, clientSize.left, clientSize.top, realWidth, realHeight, TRUE);
203205

206+
SetWindowPos(nativeWindow, HWND_TOPMOST, clientSize.left, clientSize.top, realWidth, realHeight, SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED);
207+
204208
{
205209
//TODO: thoroughly test this stuff (what is this about, you need to register devices yourself!? I thought Windows can give you a list of raw input devices!?)
206210
constexpr uint32_t INPUT_DEVICES_COUNT = 5;

0 commit comments

Comments
 (0)