-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows: get/setWindowSize include drop shadow area #289
Labels
Comments
tonsky
added
Good First Issue
Good for newcomers
Help Wanted
Extra attention is needed
Platform: Windows
labels
Feb 20, 2024
2 tasks
I'm working on this now as part of #286 -- it might take me some days to get the PR ready, but this local code seems to work. RECT jwm::WindowWin32::_getWindowRectSimple() const {
RECT rect;
// TODO: continue using old implementation if "OS major version is < 6" (Vista)
// GetWindowRect(_hWnd, &rect);
DwmGetWindowAttribute(_hWnd, DWMWA_EXTENDED_FRAME_BOUNDS, &rect, sizeof(rect));
return rect;
}
jwm::IRect jwm::WindowWin32::getWindowRect() const {
RECT rect = _getWindowRectSimple();
return IRect{rect.left, rect.top, rect.right, rect.bottom};
} I've replaced all calls to winAPI |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
They shouldn’t. We want window bounds excluding the drop shadow, both for getting and setting window position and size.
https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getwindowrect#return-value
The text was updated successfully, but these errors were encountered: