-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create alt-tab-delayer.wh.cpp #993
base: main
Are you sure you want to change the base?
Conversation
mods/alt-tab-delayer.wh.cpp
Outdated
|
||
// ==WindhawkModSettings== | ||
/* | ||
- delay: 400 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a lot, let's change it to 150, that's what Ubuntu/Gnome does.
https://discourse.gnome.org/t/how-to-modify-alt-tab-window-switch-delay-and-also-popup-delay/2569/2
mods/alt-tab-delayer.wh.cpp
Outdated
When you press the Alt+Tab combination, the Alt+Tab window will be delayed by | ||
the specified number of milliseconds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add motivation, something like:
This helps reduce visual distractions by preventing brief flickers when quickly switching between apps, similar to how macOS and Ubuntu handle fast app switching.
Full summary by AI if you want to adapt it:
When you press the Alt+Tab combination, the Alt+Tab window will be delayed by | |
the specified number of milliseconds. | |
# Alt tab window delayer | |
This mod improves the Alt+Tab behavior by introducing a short delay before | |
displaying the tasks window. It helps reduce visual distractions by preventing | |
brief flickers when quickly switching between apps, similar to how macOS and | |
Ubuntu handle fast app switching. |
mods/alt-tab-delayer.wh.cpp
Outdated
// ==WindhawkMod== | ||
// @id alt-tab-delay | ||
// @name Alt tab window delayer | ||
// @description Delays the appearance of the Alt+Tab window |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WDYT?
// @description Delays the appearance of the Alt+Tab window | |
// @description Delays the appearance of the Alt+Tab window, preventing flickering and reducing distractions during fast app switching |
mods/alt-tab-delayer.wh.cpp
Outdated
@@ -0,0 +1,121 @@ | |||
// ==WindhawkMod== | |||
// @id alt-tab-delay | |||
// @name Alt tab window delayer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// @name Alt tab window delayer | |
// @name Alt+Tab window delayer |
mods/alt-tab-delayer.wh.cpp
Outdated
@@ -0,0 +1,121 @@ | |||
// ==WindhawkMod== | |||
// @id alt-tab-delay |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// @id alt-tab-delay | |
// @id alt-tab-delayer |
mods/alt-tab-delayer.wh.cpp
Outdated
using ShowWindow_t = decltype(&ShowWindow); | ||
ShowWindow_t ShowWindow_Original; | ||
void CALLBACK TimerProc(HWND hWnd, UINT uMsg, UINT_PTR idTimer, DWORD dwTime) { | ||
KillTimer(nullptr, g_timerId); | ||
g_timerId = 0; | ||
Wh_Log(L"Timer proc %d", g_nCmdShow); | ||
ShowWindow_Original(g_taskSwitcherHwnd, SW_SHOW); | ||
} | ||
|
||
BOOL ShowWindow_Hook(HWND hWnd, int nCmdShow) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using ShowWindow_t = decltype(&ShowWindow); | |
ShowWindow_t ShowWindow_Original; | |
void CALLBACK TimerProc(HWND hWnd, UINT uMsg, UINT_PTR idTimer, DWORD dwTime) { | |
KillTimer(nullptr, g_timerId); | |
g_timerId = 0; | |
Wh_Log(L"Timer proc %d", g_nCmdShow); | |
ShowWindow_Original(g_taskSwitcherHwnd, SW_SHOW); | |
} | |
BOOL ShowWindow_Hook(HWND hWnd, int nCmdShow) { | |
void CALLBACK TimerProc(HWND hWnd, UINT uMsg, UINT_PTR idTimer, DWORD dwTime) { | |
KillTimer(nullptr, g_timerId); | |
g_timerId = 0; | |
Wh_Log(L"Timer proc %d", g_nCmdShow); | |
ShowWindow_Original(g_taskSwitcherHwnd, SW_SHOW); | |
} | |
using ShowWindow_t = decltype(&ShowWindow); | |
ShowWindow_t ShowWindow_Original; | |
BOOL ShowWindow_Hook(HWND hWnd, int nCmdShow) { |
mods/alt-tab-delayer.wh.cpp
Outdated
KillTimer(nullptr, g_timerId); | ||
g_timerId = 0; | ||
Wh_Log(L"Timer proc %d", g_nCmdShow); | ||
ShowWindow_Original(g_taskSwitcherHwnd, SW_SHOW); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
g_nCmdShow
is now unused. For me, using g_nCmdShow
here works.
No description provided.