mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
FancyZones decomposition (#2485)
* FancyZones refactoring Co-Authored-By: Andrey Nekrasov <yuyoyuppe@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "pch.h"
|
||||
#include "util.h"
|
||||
|
||||
#include <common/common.h>
|
||||
#include <common/dpi_aware.h>
|
||||
|
||||
typedef BOOL(WINAPI* GetDpiForMonitorInternalFunc)(HMONITOR, UINT, UINT*, UINT*);
|
||||
@@ -135,3 +136,19 @@ void SizeWindowToRect(HWND window, RECT rect) noexcept
|
||||
// This fixes Issue #365
|
||||
::SetWindowPlacement(window, &placement);
|
||||
}
|
||||
|
||||
bool IsInterestingWindow(HWND window, const std::vector<std::wstring>& excludedApps) noexcept
|
||||
{
|
||||
auto filtered = get_fancyzones_filtered_window(window);
|
||||
if (!filtered.zonable)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// Filter out user specified apps
|
||||
CharUpperBuffW(filtered.process_path.data(), (DWORD)filtered.process_path.length());
|
||||
if (find_app_name_in_path(filtered.process_path, excludedApps))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user