-
Notifications
You must be signed in to change notification settings - Fork 313
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: create a window which fits selected resolution better #306
base: master
Are you sure you want to change the base?
Conversation
try to get a window which is closer to the selected resolution. Still 2 pixels off horizontally, but better than what windows creates.
As it might affect existing projects I wouldn't touch this part. |
Sure, I understand. Actually, I moved from lv_drivers to pure lvgl when I fixed this. |
I don't think you have read the implementation carefully. The current 8.x implementation will apply the real size in WM_CREATE message. lv_drivers/win32drv/win32drv.c Lines 905 to 941 in 451e659
I don't use AdjustWindowRect when creating window because it's not reliable.
Also, AdjustWindowsRectExForDPI is not reliable for enabling the DWM composition which is forced beginning with Windows 8. Especially the Windows 10 frameless-style window which is the DWM hacking. So, this is why I chose only to pass the raw window size before. Because we need to let WM_CREATE message know the raw value for postprocessing. But for 8.x implementation is simplified because 8.x's driver only provides the simulator mode. Kenji Mouri |
try to get a window which is closer to the selected resolution. Still 2 pixels off horizontally, but better than what windows creates.