• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Cross-Platform OpenGL Windowing Library


コミットメタ情報

リビジョン5ad8ffe3493dedb02cefcc234c6ee291b533d8b9 (tree)
日時2018-11-11 14:03:30
作者AlaskanEmily <emily@alas...>
コミッターAlaskanEmily

ログメッセージ

Fix disabling resize in Win32

変更サマリ

差分

--- a/glow_win32.c
+++ b/glow_win32.c
@@ -14,6 +14,11 @@
1414
1515 /******************************************************************************/
1616
17+#define GLOW_WINDOW_STYLE\
18+ (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX)
19+
20+/******************************************************************************/
21+
1722 struct Glow_Context{
1823 HDC dc;
1924 HGLRC ctx;
@@ -273,16 +278,30 @@ void Glow_CreateWindow(struct Glow_Window *out,
273278
274279 {
275280 RECT size;
281+ DWORD style = ((flags & GLOW_UNDECORATED) == 0) ?
282+ GLOW_WINDOW_STYLE : WS_OVERLAPPED) |
283+
284+ if((flags & GLOW_RESIZABLE) != 0){
285+ style |= WS_THICKFRAME | WS_MAXIMIZEBOX;
286+ }
276287
277288 size.left = 0;
278289 size.top = 0;
279290 size.right = w;
280291 size.bottom = h;
281- AdjustWindowRect(&size, WS_OVERLAPPEDWINDOW, TRUE);
292+ AdjustWindowRect(&size, style, TRUE);
282293 size.bottom += (GetSystemMetrics(SM_CYFRAME) +
283294 GetSystemMetrics(SM_CYCAPTION) +
284295 GetSystemMetrics(SM_CXPADDEDBORDER));
285- out->win = CreateWindow(GLOW_CLASS_NAME, title, WS_OVERLAPPEDWINDOW, 64, 64, size.right, size.bottom, NULL, NULL, glow_app, out);
296+ out->win = CreateWindow(GLOW_CLASS_NAME,
297+ title,
298+ style,
299+ 64, 64,
300+ size.right, size.bottom,
301+ NULL,
302+ NULL,
303+ glow_app,
304+ out);
286305 }
287306 }
288307