Skip to content

Commit

Permalink
Add code-side close request
Browse files Browse the repository at this point in the history
  • Loading branch information
David committed Aug 17, 2017
1 parent 93eb24d commit a981d1e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion source/oswald/platform/win32.d
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ struct Win32WindowData
DWORD style = WS_OVERLAPPEDWINDOW;

if (!config.resizeable)
style = WS_OVERLAPPEDWINDOW ^ WS_SIZEBOX;
style ^= WS_SIZEBOX;

//dfmt off
HWND hwnd = CreateWindowExW(
Expand Down
5 changes: 5 additions & 0 deletions source/oswald/window.d
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ struct OsWindow

version (Windows) alias win32 = platformData;

void close()
{
isCloseRequested = true;
}

void show()
{
platformShowWindow(_platformData);
Expand Down

0 comments on commit a981d1e

Please sign in to comment.