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

Add Hide Taskbar on Specific Monitor Mod #1579

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Repilee
Copy link

@Repilee Repilee commented Feb 24, 2025

This mod allows users to hide the taskbar on a specific monitor while keeping it visible on others.

  • Supports Windows 10, and Windows 11. Possibly even pre-Windows 10 systems (untested)
  • Primary monitor is always assigned as "1".
  • Restores the taskbar when the mod is disabled.

Useful for having a dedicated monitor for display where having a taskbar is not needed.

@aubymori
Copy link
Contributor

// Function to wait for Explorer and Taskbar to load
void WaitForExplorer() {
    int attempts = 0;
    while (attempts < 30) {  // Wait up to 30 seconds for Explorer
        HWND taskbar = FindWindow(L"Shell_TrayWnd", NULL);
        if (taskbar) {
            Wh_Log(L"Explorer is ready, proceeding...");
            return;
        }
        Wh_Log(L"Explorer not ready yet, retrying...");
        std::this_thread::sleep_for(std::chrono::seconds(1));
        attempts++;
    }
    Wh_Log(L"Explorer did not load within 30 seconds, exiting.");
}

You can more efficiently capture taskbar window creation by hooking CreateWindowExW, although the user will have to allow Windhawk to inject into winlogon.exe to capture explorer.exe starting.

CreateWindowExW hook: notepad-clientedge.wh.cpp
Warning to add to mod README: small-tray-icons-on-touch.wh.cpp

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