Cross-Platform OpenGL Windowing Library
修订版 | 95951d9a238c09661f1a502de199953b0163712a (tree) |
---|---|
时间 | 2020-08-03 08:27:23 |
作者 | AlaskanEmily <emily@alas...> |
Commiter | AlaskanEmily |
Fix window sizing issues on Windows 8/10
@@ -373,14 +373,14 @@ void Glow_CreateWindow(struct Glow_Window *out, | ||
373 | 373 | size.top = 0; |
374 | 374 | size.right = w; |
375 | 375 | size.bottom = h; |
376 | + /* Note that AdjustWindowRect will center the client area around the | |
377 | + * left/top of the input, so we will need to use the differences for | |
378 | + * the actual window dimensions. */ | |
376 | 379 | AdjustWindowRect(&size, style, TRUE); |
377 | - size.bottom += (GetSystemMetrics(SM_CYFRAME) + | |
378 | - GetSystemMetrics(SM_CYCAPTION) + | |
379 | - GetSystemMetrics(SM_CXPADDEDBORDER)); | |
380 | 380 | out->win = CreateWindow(GLOW_CLASS_NAME, |
381 | 381 | title, |
382 | 382 | style, |
383 | - 64, 64, size.right, size.bottom, | |
383 | + 64, 64, size.right - size.left, size.bottom - size.top, | |
384 | 384 | NULL, NULL, |
385 | 385 | glow_app, |
386 | 386 | out); |