-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
The Window size (client area) is incorrect when using Windows display driver. #6679
Comments
We need some feedback on this issue. Now we mark this as "stale" because there was no activity here for 14 days. Remove the "stale" label or comment else this will be closed in 7 days. |
Thank you for reporting it! @MouriNaruto could you take look at this issue? |
I believe there are also 2 one-off errors in this call. Specifically: width should be = rc.right - rc.left + 1 + (2 * edge_width); or width should be = rc.right - rc.left + 1 + (edge_width << 1); if your compiler doesn't optimize multiplying by 2. I am a little rusty on Width = Right - Left and I am 100% certain that: Right = 1 pixel PAST right edge, and Note: There are ways to create a window where the width and height passed are for the CLIENT AREA, which is what is wanted. This question/answer on stackexchange.com covers one way to do that. Kind regards, |
I will try to fix that. Kenji Mouri |
We need some feedback on this issue. Now we mark this as "stale" because there was no activity here for 14 days. Remove the "stale" label or comment else this will be closed in 7 days. |
@MouriNaruto did you have time to look into this? |
I will look into this issue in the recent days. Kenji Mouri |
We need some feedback on this issue. Now we mark this as "Abandoned" because there was no activity here for 14 days. Remove the "Stale" label or comment else this will be closed in 7 days. |
not stale |
LVGL version
v9.0.0
What happened?
When using lv_windows_create_display() to create LVGL display, the Window's client area always smaller than the specified screen resolution.
for example, lv_windows_create_display(L"LVGL Window", 1024, 600, 100, true, false);
then, the created window is at the resolution of 1024*600, however, its client area is smaller and about to 1000 * 550.
This is because the specified display resolution does not consider the window caption and client edge size.
Here's a possible fix for this issue.
In lv_windows_display_thread_entrypoint() function, calling AdjustWindowRectEx before CreateWindowExW.
` RECT rc = {0, 0, data->hor_res, data->ver_res};
AdjustWindowRectEx(&rc, window_style, FALSE, WS_EX_CLIENTEDGE);
How to reproduce?
No response
The text was updated successfully, but these errors were encountered: