Skip to content

Commit

Permalink
Fix Chrome tab move leaving zone highlighted
Browse files Browse the repository at this point in the history
  • Loading branch information
bzoz committed Nov 4, 2019
1 parent 1d3acbe commit 5052b39
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/modules/fancyzones/dll/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ class FancyZonesModule : public PowertoyModuleIface
void MoveSizeEnd(HWND window, POINT const& ptScreen) noexcept;
void MoveSizeUpdate(POINT const& ptScreen) noexcept;

HANDLE m_moved_window = nullptr;
winrt::com_ptr<IFancyZones> m_app;
winrt::com_ptr<IFancyZonesSettings> m_settings;
};
Expand Down Expand Up @@ -298,15 +299,17 @@ void FancyZonesModule::MoveSizeStart(HWND window, POINT const& ptScreen) noexcep
{
if (auto monitor = MonitorFromPoint(ptScreen, MONITOR_DEFAULTTONULL))
{
m_moved_window = window;
m_app.as<IFancyZonesCallback>()->MoveSizeStart(window, monitor, ptScreen);
}
}
}

void FancyZonesModule::MoveSizeEnd(HWND window, POINT const& ptScreen) noexcept
{
if (IsInterestingWindow(window))
if (IsInterestingWindow(window) || (window != nullptr && window == m_moved_window))
{
m_moved_window = nullptr;
m_app.as<IFancyZonesCallback>()->MoveSizeEnd(window, ptScreen);
}
}
Expand Down

0 comments on commit 5052b39

Please sign in to comment.