mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-06-07 09:28:03 +08:00
PowerLauncher can be snapped to zone - fix (#2896)
This commit is contained in:
parent
c9535749f5
commit
e723e87c74
@ -89,8 +89,8 @@ void OrderMonitors(std::vector<std::pair<HMONITOR, RECT>>& monitorInfo)
|
||||
size_t current = candidates[j];
|
||||
|
||||
// Compare (top, left) lexicographically
|
||||
if (std::tie(monitorInfo[current].second.top, monitorInfo[current].second.left)
|
||||
< std::tie(monitorInfo[smallest].second.top, monitorInfo[smallest].second.left))
|
||||
if (std::tie(monitorInfo[current].second.top, monitorInfo[current].second.left) <
|
||||
std::tie(monitorInfo[smallest].second.top, monitorInfo[smallest].second.left))
|
||||
{
|
||||
smallest = current;
|
||||
}
|
||||
@ -115,7 +115,7 @@ void SizeWindowToRect(HWND window, RECT rect) noexcept
|
||||
WINDOWPLACEMENT placement{};
|
||||
::GetWindowPlacement(window, &placement);
|
||||
|
||||
//wait if SW_SHOWMINIMIZED would be removed from window (Issue #1685)
|
||||
//wait if SW_SHOWMINIMIZED would be removed from window (Issue #1685)
|
||||
for (int i = 0; i < 5 && (placement.showCmd & SW_SHOWMINIMIZED) != 0; i++)
|
||||
{
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||
@ -150,5 +150,9 @@ bool IsInterestingWindow(HWND window, const std::vector<std::wstring>& excludedA
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (find_app_name_in_path(filtered.process_path, { L"POWERLAUNCHER.EXE" }))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user