Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/platform/windows/clipboard_windows.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
#ifndef NOMINMAX
#define NOMINMAX
#endif
// clang-format off
// Windows headers must precede GDI+ and shell declarations.
#include <windows.h>

#include <algorithm>
// gdiplus.h spells min / max unqualified and breaks under NOMINMAX without these.
using std::max;
using std::min;
#include <gdiplus.h>
#include <shellapi.h>
#include <shlobj.h>
// clang-format on

#include <algorithm>
#include <climits>
#include <cstdio>
#include <cstring>
Expand Down
6 changes: 5 additions & 1 deletion src/platform/windows/drag_source_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
#include <ole2.h>
#include <shellapi.h>
#include <shlobj.h>
// clang-format on
#include <algorithm>
// gdiplus.h spells min / max unqualified and breaks under NOMINMAX without these.
using std::max;
using std::min;
#include <gdiplus.h>
// clang-format on

#include <memory>
#include <string>
Expand Down
8 changes: 7 additions & 1 deletion src/platform/windows/image_windows.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
// clang-format off
#include <windows.h>
#include <comdef.h>
#include <algorithm>
// gdiplus.h spells min / max unqualified and breaks under NOMINMAX without these.
using std::max;
using std::min;
#include <gdiplus.h>
#include <windows.h>
// clang-format on
#include <memory>
#include <string>
#include <vector>
Expand Down
6 changes: 6 additions & 0 deletions src/platform/windows/menu_winui3_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
#include "winui3_runtime_windows.h"
#undef GetCurrentTime

// clang-format off
#include <algorithm>
// gdiplus.h spells min / max unqualified and breaks under NOMINMAX without these.
using std::max;
using std::min;
#include <gdiplus.h>
// clang-format on
#include <robuffer.h>
#include <winrt/Windows.Foundation.Collections.h>
#include <winrt/Windows.Storage.Streams.h>
Expand Down
5 changes: 4 additions & 1 deletion src/platform/windows/window_taskbar_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
#include <windows.h>
#include <commctrl.h>
#include <dwmapi.h>
#include <algorithm>
// gdiplus.h spells min / max unqualified and breaks under NOMINMAX without these.
using std::max;
using std::min;
#include <gdiplus.h>
#include <shobjidl.h>
// clang-format on

#include <algorithm>
#include <array>
#include <chrono>
#include <cmath>
Expand Down
Loading