mirror of
https://github.com/microsoft/PowerToys
synced 2025-08-31 22:45:32 +00:00
Fix Chrome tab move leaving zone highlighted (#656)
Fixes: https://github.com/microsoft/PowerToys/issues/534
This commit is contained in:
committed by
GitHub
parent
94d07833c5
commit
96aa6ae3ef
@@ -220,6 +220,7 @@ private:
|
|||||||
void MoveSizeEnd(HWND window, POINT const& ptScreen) noexcept;
|
void MoveSizeEnd(HWND window, POINT const& ptScreen) noexcept;
|
||||||
void MoveSizeUpdate(POINT const& ptScreen) noexcept;
|
void MoveSizeUpdate(POINT const& ptScreen) noexcept;
|
||||||
|
|
||||||
|
HANDLE m_movedWindow = nullptr;
|
||||||
winrt::com_ptr<IFancyZones> m_app;
|
winrt::com_ptr<IFancyZones> m_app;
|
||||||
winrt::com_ptr<IFancyZonesSettings> m_settings;
|
winrt::com_ptr<IFancyZonesSettings> m_settings;
|
||||||
};
|
};
|
||||||
@@ -298,6 +299,7 @@ void FancyZonesModule::MoveSizeStart(HWND window, POINT const& ptScreen) noexcep
|
|||||||
{
|
{
|
||||||
if (auto monitor = MonitorFromPoint(ptScreen, MONITOR_DEFAULTTONULL))
|
if (auto monitor = MonitorFromPoint(ptScreen, MONITOR_DEFAULTTONULL))
|
||||||
{
|
{
|
||||||
|
m_movedWindow = window;
|
||||||
m_app.as<IFancyZonesCallback>()->MoveSizeStart(window, monitor, ptScreen);
|
m_app.as<IFancyZonesCallback>()->MoveSizeStart(window, monitor, ptScreen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -305,8 +307,9 @@ void FancyZonesModule::MoveSizeStart(HWND window, POINT const& ptScreen) noexcep
|
|||||||
|
|
||||||
void FancyZonesModule::MoveSizeEnd(HWND window, POINT const& ptScreen) noexcept
|
void FancyZonesModule::MoveSizeEnd(HWND window, POINT const& ptScreen) noexcept
|
||||||
{
|
{
|
||||||
if (IsInterestingWindow(window))
|
if (IsInterestingWindow(window) || (window != nullptr && window == m_movedWindow))
|
||||||
{
|
{
|
||||||
|
m_movedWindow = nullptr;
|
||||||
m_app.as<IFancyZonesCallback>()->MoveSizeEnd(window, ptScreen);
|
m_app.as<IFancyZonesCallback>()->MoveSizeEnd(window, ptScreen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user