Skip to content
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

taskbar-autohide-better 1.0 #328

Merged
merged 1 commit into from
Oct 2, 2023
Merged

taskbar-autohide-better 1.0 #328

merged 1 commit into from
Oct 2, 2023

Conversation

Cirn09
Copy link
Contributor

@Cirn09 Cirn09 commented Oct 1, 2023

preview:
demo

mods/taskbar-autohide-better.wh.cpp Outdated Show resolved Hide resolved
mods/taskbar-autohide-better.wh.cpp Outdated Show resolved Hide resolved
@Cirn09 Cirn09 force-pushed the main branch 2 times, most recently from c85cbc4 to fe54e1e Compare October 2, 2023 06:52
mods/taskbar-autohide-better.wh.cpp Outdated Show resolved Hide resolved
// ==WindhawkModReadme==
/*
# Better Taskbar Autohide
Allow taskbar autohide when inactive window notified
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Up to you, but I think the description can be improved. What does "inactive window notified" mean? What happens without the mod and what changes when the mod is used?

@m417z m417z merged commit 8494ed1 into ramensoftware:main Oct 2, 2023
1 check passed
@m417z
Copy link
Member

m417z commented Oct 2, 2023

I've just noticed that the image link is incorrect, it should have been https://i.imgur.io/BNyrMQc.gif, not https://imgur.io/BNyrMQc.gif. Feel free to submit an update.

Also, while at it, it can be helpful to specify the supported Windows versions. I assume this mod is only for Windows 10?

@Cirn09
Copy link
Contributor Author

Cirn09 commented Oct 3, 2023

it can compatible with Windows 11. But before that, consider provide a api to check Windows version like:

WinVersion GetWindowsVersion() {
VS_FIXEDFILEINFO* fixedFileInfo = GetModuleVersionInfo(nullptr, nullptr);
if (!fixedFileInfo)
return WinVersion::Unsupported;
WORD major = HIWORD(fixedFileInfo->dwFileVersionMS);
WORD minor = LOWORD(fixedFileInfo->dwFileVersionMS);
WORD build = HIWORD(fixedFileInfo->dwFileVersionLS);
WORD qfe = LOWORD(fixedFileInfo->dwFileVersionLS);
Wh_Log(L"Version: %u.%u.%u.%u", major, minor, build, qfe);
switch (major) {
case 10:
if (build < 22000)
return WinVersion::Win10;
else
return WinVersion::Win11;
break;
}
return WinVersion::Unsupported;

@m417z
Copy link
Member

m417z commented Oct 3, 2023

This function name is slightly misleading, a better name would be GetMainModuleVersion. For a module such as explorer.exe, both are usually the same, except for exotic configurations such as Win7 explorer running on win10 (I've seen people do that).

You can copy that function, or, if you just want to truly check the Windows version, you already have Windows APIs for that, for example:

if (IsWindows10OrGreater())
{
Wh_Log(L"This mod is designed for Windows 8.1 and below");
return FALSE;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants