aboutsummaryrefslogtreecommitdiff
path: root/c
diff options
context:
space:
mode:
Diffstat (limited to 'c')
-rw-r--r--c/win.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/c/win.cpp b/c/win.cpp
index a09b19b..e8c429d 100644
--- a/c/win.cpp
+++ b/c/win.cpp
@@ -18,8 +18,8 @@ void WithNextWindow(void (*proc)(HWND))
* that static storage must be used, as SetWindowHookEx cannot
* accept a capturing lambda as the hook procedure. */
- static __thread auto procNext = proc;
- static __thread HHOOK hHook = Require(SetWindowsHookEx(WH_CBT, [](const int nCode,
+ static thread_local auto procNext = proc;
+ static thread_local HHOOK hHook = Require(SetWindowsHookEx(WH_CBT, [](const int nCode,
const WPARAM wParam, const LPARAM lParam) -> LRESULT CALLBACK
{
if (nCode == HCBT_CREATEWND) {
@@ -42,9 +42,9 @@ static void CenterNextWindow(HWND hWnd)
* is delayed until the new window is activated. This
* complicates the code somewhat. */
- static __thread HWND hWndParent;
- static __thread HWND hWndNext;
- static __thread HHOOK hHook;
+ static thread_local HWND hWndParent;
+ static thread_local HWND hWndNext;
+ static thread_local HHOOK hHook;
hWndParent = hWnd;
hWndNext = nullptr;