Skip to content

Commit

Permalink
Taskbar on top for Windows 11 v1.0.5
Browse files Browse the repository at this point in the history
* Fixed an incompatibility with the following mods which could lead to a crash: Taskbar tray icon spacing, Taskbar tray system icon tweaks.
  • Loading branch information
m417z committed Nov 3, 2024
1 parent 350f82b commit 412a470
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions mods/taskbar-on-top.wh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// @id taskbar-on-top
// @name Taskbar on top for Windows 11
// @description Moves the Windows 11 taskbar to the top of the screen
// @version 1.0.4
// @version 1.0.5
// @author m417z
// @github https://github.com/m417z
// @twitter https://twitter.com/m417z
Expand Down Expand Up @@ -782,13 +782,13 @@ TaskbarFrame_TaskbarFrame_t TaskbarFrame_TaskbarFrame_Original;
void* WINAPI TaskbarFrame_TaskbarFrame_Hook(void* pThis) {
Wh_Log(L">");

pThis = TaskbarFrame_TaskbarFrame_Original(pThis);
void* ret = TaskbarFrame_TaskbarFrame_Original(pThis);

FrameworkElement taskbarFrame = nullptr;
((IUnknown**)pThis)[1]->QueryInterface(winrt::guid_of<FrameworkElement>(),
winrt::put_abi(taskbarFrame));
if (!taskbarFrame) {
return pThis;
return ret;
}

g_elementLoadedAutoRevokerList.emplace_back();
Expand Down Expand Up @@ -819,7 +819,7 @@ void* WINAPI TaskbarFrame_TaskbarFrame_Hook(void* pThis) {
}
});

return pThis;
return ret;
}

void ApplySystemTrayChevronIconViewStyle(
Expand Down Expand Up @@ -858,13 +858,13 @@ IconView_IconView_t IconView_IconView_Original;
void* WINAPI IconView_IconView_Hook(void* pThis) {
Wh_Log(L">");

pThis = IconView_IconView_Original(pThis);
void* ret = IconView_IconView_Original(pThis);

FrameworkElement iconView = nullptr;
((IUnknown**)pThis)[1]->QueryInterface(winrt::guid_of<FrameworkElement>(),
winrt::put_abi(iconView));
if (!iconView) {
return pThis;
return ret;
}

g_elementLoadedAutoRevokerList.emplace_back();
Expand Down Expand Up @@ -894,7 +894,7 @@ void* WINAPI IconView_IconView_Hook(void* pThis) {
}
});

return pThis;
return ret;
}

using OverflowFlyoutModel_Show_t = void(WINAPI*)(void* pThis);
Expand Down

0 comments on commit 412a470

Please sign in to comment.