Skip to content

Commit

Permalink
Lua: Fix nonsense dc size being computed when client area is shorter …
Browse files Browse the repository at this point in the history
…than statusbar
  • Loading branch information
Aurumaker72 committed Mar 10, 2024
1 parent f05bdfb commit 76fd95d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/LuaConsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ void LuaEnvironment::create_renderer()
GetWindowRect(Statusbar::hwnd(), &rc);
window_rect.bottom -= (WORD)(rc.bottom - rc.top);
}
dc_size = { (UINT32)window_rect.right, (UINT32)window_rect.bottom };
dc_size = { (UINT32)abs(window_rect.right), (UINT32)abs(window_rect.bottom) };

d2d_overlay_hwnd = CreateWindowEx(WS_EX_LAYERED, d2d_overlay_class, "", WS_CHILD | WS_VISIBLE, 0, 0, dc_size.width, dc_size.height, mainHWND, nullptr, GetModuleHandle(nullptr), nullptr);
SetWindowLongPtr(d2d_overlay_hwnd, GWLP_USERDATA, (LONG_PTR)this);
Expand Down

0 comments on commit 76fd95d

Please sign in to comment.