explorer.exe pick the Taskbar instead of File Explorer
Problem: When you add an App with Filename explorer or explorer.exe, WTQ will pick the Taskbar to be in quake mode. I'm also on a dual monitor, and it's picking the Taskbar from the non-primary display, if that's related.
Expected result: WTQ should pick up File Explorer instead of the Taskbar.
So far I have tried: Use argument list to make it open the File Explorer, Fill out the Window Title as File Explorer Home, and trying to find the File Explorer .exe which is still the same explorer.exe, so I gave up there.
OS: Windows 11
Thank you for reporting this! I'll look into this.
Update: This is gonna require a bit of rework on how windows are found and attached to.
Currently (i.e. WTQ 2.0.15), a window is found through its process. So a list of processes is pulled up, and each process's main window can be attached to, if the process itself matches the criteria.
However, processes can have multiple windows, limiting what we can attach do since we're kinda assuming a process = 1 window.
The "explorer" process is such a process, where a single process owns multiple windows, such as the taskbar open file browsers.
So I'm looking into considering not only the process's main window, but the entire list of available windows.
This will probably mean we need more ways of specifying the window, because now we have a bunch of windows coming from the same process (i.e. with the same process- and/or filename).
In the case of explorer, one criterium could be the window class.
My plan:
- Rework the find & attach process to consider individual windows, not just main windows
- Add additional criteria to pick out a single window among multiple within the same process
- Add a way to see what criteria can be used (through the "Windows" screen in the GUI, which lists what windows are available, and how they can be matched)
- Fix the example for file browser to include enough criteria so it can easily be added that way, without needing to mess around with criteria at all
Here's a gif of a prototype toggling the file explorer:
Here's an early (very noisy) screenshot of the "Windows" page, that should help with figuring out how to match a window:
I'll keep you posted when a prerelease is available!
Appreciate for the long explanation and the upcoming rework, I will try it out when there's a prerelease of it, for now everything seems to be working fine except for the file explorer so I can live with that
@Muko-Tabi Sorry for the late response, this has been quite the refactor to get working.
I've added a new version of the "window-finding-and-attaching"-module.
The new one directly looks up a list of windows, instead of looking up a list of processes, and then looking at their windows. This allows us to find non-main-windows, like the file browser, that is part of the main "explorer" shell process.
The new bits are part of the vNext release, and I'll be testing and polishing the next couple days to then hopefully make a stable release for WinGet and Scoop.
Here's an example of the wtq.jsonc settings file, to attach to a file explorer window:
{
"Apps": [
{
"Name": "WindowsExplorer",
"Hotkeys": [{ "Modifiers": "Control", "KeyChar": "!" }],
"FileName": "explorer",
"WindowClass": "CabinetWClass"
// ^^^^^^^^^^^^^ Used to differentiate between multiple "explorer" processes.
}
]
}
I've noticed that after the first attach, the window tends to get resized, much of the window is white and empty, and you need to click around a bit in the file explorer so it redraws.
I'd love your feedback if you have some time to test the prerelease!
Also, thank you for pointing this out, I think it's a great addition to the app 🙂
Hey there, I just tested the vNext release, it works great, only issue I have here is there's a white bar on top, other than that this issue is good to be closed
Thanks for reworking WTQ to make this work wonderfully, cheer.
Thank you!
I'll see if I can repro that, it looks like a redraw thing. I'm hoping to be able to force explorer to redraw, but no promises 🙂
On the latest vNext version, there's no more of that white bar, so should be everything to this now :D
Nice! Thank you for reporting!