Skip to content

Commit

Permalink
[FancyZones] Invalidate cached work areas when display resolution or …
Browse files Browse the repository at this point in the history
…taskbar position changes (#4800)

* Invalidate cached work areas when display resolution or taskbar position changes

* Update comments in code
  • Loading branch information
vldmr11080 authored and enricogior committed Jul 9, 2020
1 parent 79eda16 commit 3450d83
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/modules/fancyzones/lib/FancyZones.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -638,13 +638,18 @@ LRESULT FancyZones::WndProc(HWND window, UINT message, WPARAM wparam, LPARAM lpa
{
if (wparam == SPI_SETWORKAREA)
{
// Changes in taskbar position resulted in different size of work area.
// Invalidate cached work-areas so they can be recreated with latest information.
m_workAreaHandler.Clear();
OnDisplayChange(DisplayChangeType::WorkArea);
}
}
break;

case WM_DISPLAYCHANGE:
{
// Display resolution changed. Invalidate cached work-areas so they can be recreated with latest information.
m_workAreaHandler.Clear();
OnDisplayChange(DisplayChangeType::DisplayChange);
}
break;
Expand Down

0 comments on commit 3450d83

Please sign in to comment.