mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-10 13:35:31 +02:00
Make FancyZones not zone invisible, child and tool windows
Fixes "Move newly created windows to their last known zone"
This commit is contained in:
committed by
Bartosz Sosnowski
parent
cbe6d19c79
commit
0e2d93c630
@@ -18,9 +18,10 @@ HWND HWNDDataCache::get_window(HWND hwnd) {
|
|||||||
WindowAndProcPath* HWNDDataCache::get_internal(HWND hwnd) {
|
WindowAndProcPath* HWNDDataCache::get_internal(HWND hwnd) {
|
||||||
auto root = GetAncestor(hwnd, GA_ROOT);
|
auto root = GetAncestor(hwnd, GA_ROOT);
|
||||||
// Filter the fast and easy cases
|
// Filter the fast and easy cases
|
||||||
if (is_invalid_hwnd(root) ||
|
if (!IsWindowVisible(root) ||
|
||||||
is_invalid_class(root) ||
|
is_invalid_hwnd(root) ||
|
||||||
is_invalid_style(root)) {
|
is_invalid_class(root) ||
|
||||||
|
is_invalid_style(root)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
// Get the HWND process path from the cache
|
// Get the HWND process path from the cache
|
||||||
|
|||||||
@@ -215,7 +215,9 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
// Don't zone child windows and tool window
|
||||||
|
return (GetWindowLongPtr(window, GWL_STYLE) & WS_CHILD) == 0 &&
|
||||||
|
(GetWindowLongPtr(window, GWL_EXSTYLE) & WS_EX_TOOLWINDOW) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Disable(bool const traceEvent)
|
void Disable(bool const traceEvent)
|
||||||
|
|||||||
Reference in New Issue
Block a user