mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
clean up
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
#include <winrt/Windows.ApplicationModel.Core.h>
|
#include <winrt/Windows.ApplicationModel.Core.h>
|
||||||
|
|
||||||
#include <shellapi.h>
|
#include <shellapi.h>
|
||||||
|
#include <ShellScalingApi.h>
|
||||||
|
|
||||||
#include <projects-common/AppUtils.h>
|
#include <projects-common/AppUtils.h>
|
||||||
#include <projects-common/MonitorEnumerator.h>
|
#include <projects-common/MonitorEnumerator.h>
|
||||||
|
|||||||
@@ -1,15 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <Windows.h>
|
|
||||||
#include <ShellScalingApi.h>
|
|
||||||
|
|
||||||
#include <algorithm>
|
|
||||||
|
|
||||||
#include <common/Display/dpi_aware.h>
|
#include <common/Display/dpi_aware.h>
|
||||||
#include <common/utils/excluded_apps.h>
|
#include <common/utils/excluded_apps.h>
|
||||||
#include <common/utils/window.h>
|
#include <common/utils/window.h>
|
||||||
|
|
||||||
// FancyZones WindowUtils
|
|
||||||
namespace WindowUtils
|
namespace WindowUtils
|
||||||
{
|
{
|
||||||
// Non-Localizable strings
|
// Non-Localizable strings
|
||||||
@@ -34,6 +28,11 @@ namespace WindowUtils
|
|||||||
return GetAncestor(window, GA_ROOT) == window;
|
return GetAncestor(window, GA_ROOT) == window;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool IsMinimized(HWND window)
|
||||||
|
{
|
||||||
|
return IsIconic(window);
|
||||||
|
}
|
||||||
|
|
||||||
inline bool IsMaximized(HWND window) noexcept
|
inline bool IsMaximized(HWND window) noexcept
|
||||||
{
|
{
|
||||||
WINDOWPLACEMENT placement{};
|
WINDOWPLACEMENT placement{};
|
||||||
@@ -107,15 +106,6 @@ namespace WindowUtils
|
|||||||
|
|
||||||
return rect;
|
return rect;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// addition for Projects
|
|
||||||
namespace WindowUtils
|
|
||||||
{
|
|
||||||
inline bool IsMinimized(HWND window)
|
|
||||||
{
|
|
||||||
return IsIconic(window);
|
|
||||||
}
|
|
||||||
|
|
||||||
#define MAX_TITLE_LENGTH 255
|
#define MAX_TITLE_LENGTH 255
|
||||||
inline std::wstring GetWindowTitle(HWND window)
|
inline std::wstring GetWindowTitle(HWND window)
|
||||||
|
|||||||
Reference in New Issue
Block a user