mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 19:57:07 +02:00
[FancyZones] Window switch shortcut fix (#21426)
* rename Layout -> LayoutData * simplify zone * split ZoneSet: Layout * refactoring * split ZoneSet: LayoutWindows * update trace * split ZoneSet: remove ZoneSet * fix initialization * split unit tests * remove unused * warning * nullptr check * use current rect * update work area tests * use current rect * simplify * more meaningful name * dismiss * safety checks * resolve conflicts * reassign windows after switching vd * avoid double-processing for window on switching vd * extend windows fix * check if window is on current desktop before cycling * separated extend * not reinit layout windows
This commit is contained in:
31
src/modules/fancyzones/FancyZonesLib/Layout.h
Normal file
31
src/modules/fancyzones/FancyZonesLib/Layout.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
#include <FancyZonesLib/FancyZonesData/LayoutData.h>
|
||||
#include <FancyZonesLib/util.h>
|
||||
|
||||
#include <FancyZonesLib/LayoutConfigurator.h> // ZonesMap
|
||||
|
||||
class Layout
|
||||
{
|
||||
public:
|
||||
Layout(const LayoutData& data);
|
||||
~Layout() = default;
|
||||
|
||||
bool Init(const FancyZonesUtils::Rect& workAreaRect, HMONITOR monitor) noexcept;
|
||||
|
||||
GUID Id() const noexcept;
|
||||
FancyZonesDataTypes::ZoneSetLayoutType Type() const noexcept;
|
||||
|
||||
const ZonesMap& Zones() const noexcept;
|
||||
ZoneIndexSet ZonesFromPoint(POINT pt) const noexcept;
|
||||
/**
|
||||
* Returns all zones spanned by the minimum bounding rectangle containing the two given zone index sets.
|
||||
*/
|
||||
ZoneIndexSet GetCombinedZoneRange(const ZoneIndexSet& initialZones, const ZoneIndexSet& finalZones) const noexcept;
|
||||
|
||||
RECT GetCombinedZonesRect(const ZoneIndexSet& zones);
|
||||
|
||||
private:
|
||||
const LayoutData m_data;
|
||||
ZonesMap m_zones{};
|
||||
};
|
||||
Reference in New Issue
Block a user