Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Commit

Permalink
win: minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
wangwenx190 committed Jul 22, 2023
1 parent 8e73e3e commit b57da21
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/core/utils_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2501,6 +2501,14 @@ bool Utils::isValidWindow(const WId windowId, const bool checkVisible, const boo
if (::IsWindow(hwnd) == FALSE) {
return false;
}
const LONG_PTR styles = ::GetWindowLongPtrW(hwnd, GWL_STYLE);
if ((styles == 0) || (styles & WS_DISABLED)) {
return false;
}
const LONG_PTR exStyles = ::GetWindowLongPtrW(hwnd, GWL_EXSTYLE);
if (exStyles & WS_EX_TOOLWINDOW) {
return false;
}
RECT rect = { 0, 0, 0, 0 };
if (::GetWindowRect(hwnd, &rect) == FALSE) {
return false;
Expand Down

0 comments on commit b57da21

Please sign in to comment.