mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
[CI] FancyZones unit tests (#17910)
This commit is contained in:
@@ -104,7 +104,8 @@ namespace
|
||||
WindowPool windowPool;
|
||||
}
|
||||
|
||||
WorkArea::WorkArea(HINSTANCE hinstance)
|
||||
WorkArea::WorkArea(HINSTANCE hinstance, const FancyZonesDataTypes::WorkAreaId& uniqueId) :
|
||||
m_uniqueId(uniqueId)
|
||||
{
|
||||
WNDCLASSEXW wcex{};
|
||||
wcex.cbSize = sizeof(WNDCLASSEX);
|
||||
@@ -120,24 +121,6 @@ WorkArea::~WorkArea()
|
||||
windowPool.FreeZonesOverlayWindow(m_window);
|
||||
}
|
||||
|
||||
bool WorkArea::Init(HINSTANCE hinstance, const FancyZonesDataTypes::WorkAreaId& uniqueId, const FancyZonesDataTypes::WorkAreaId& parentUniqueId)
|
||||
{
|
||||
m_uniqueId = uniqueId;
|
||||
InitializeZoneSets(parentUniqueId);
|
||||
|
||||
m_window = windowPool.NewZonesOverlayWindow(m_workAreaRect, hinstance, this);
|
||||
|
||||
if (!m_window)
|
||||
{
|
||||
Logger::error(L"No work area window");
|
||||
return false;
|
||||
}
|
||||
|
||||
m_zonesOverlay = std::make_unique<ZonesOverlay>(m_window);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
HRESULT WorkArea::MoveSizeEnter(HWND window) noexcept
|
||||
{
|
||||
m_windowMoveSize = window;
|
||||
@@ -378,7 +361,20 @@ void WorkArea::FlashZones() noexcept
|
||||
|
||||
#pragma region private
|
||||
|
||||
void WorkArea::InitializeZoneSets(const FancyZonesDataTypes::WorkAreaId& parentUniqueId) noexcept
|
||||
bool WorkArea::InitWindow(HINSTANCE hinstance) noexcept
|
||||
{
|
||||
m_window = windowPool.NewZonesOverlayWindow(m_workAreaRect, hinstance, this);
|
||||
if (!m_window)
|
||||
{
|
||||
Logger::error(L"No work area window");
|
||||
return false;
|
||||
}
|
||||
|
||||
m_zonesOverlay = std::make_unique<ZonesOverlay>(m_window);
|
||||
return true;
|
||||
}
|
||||
|
||||
void WorkArea::InitLayout(const FancyZonesDataTypes::WorkAreaId& parentUniqueId) noexcept
|
||||
{
|
||||
Logger::info(L"Initialize layout on {}", m_uniqueId.toString());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user