Skip to content

Commit

Permalink
ZWidgets: disabled SetClientFrame.
Browse files Browse the repository at this point in the history
On Win32 this function is unused, but it contains two API calls that only exist in Windows 10 or later.
  • Loading branch information
coelckers authored and madame-rachelle committed Apr 21, 2024
1 parent df3b193 commit 92baaaf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libraries/ZWidget/src/window/win32/win32window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ void Win32Window::SetWindowFrame(const Rect& box)

void Win32Window::SetClientFrame(const Rect& box)
{
// This function is currently unused but needs to be disabled because it contains Windows API calls that were only added in Windows 10.
#if 0
double dpiscale = GetDpiScale();

RECT rect = {};
Expand All @@ -141,6 +143,7 @@ void Win32Window::SetClientFrame(const Rect& box)
AdjustWindowRectExForDpi(&rect, style, FALSE, exstyle, GetDpiForWindow(WindowHandle));

SetWindowPos(WindowHandle, nullptr, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, SWP_NOACTIVATE | SWP_NOZORDER);
#endif
}

void Win32Window::Show()
Expand Down

0 comments on commit 92baaaf

Please sign in to comment.