| 408 | } |
| 409 | |
| 410 | WindowInfo AppManagerWinImpl::GetTargetWindowInfo(const WindowInfos& infos) { |
| 411 | WindowInfo info; |
| 412 | if (infos.infos.empty()) { |
| 413 | return info; |
| 414 | } |
| 415 | |
| 416 | for (const auto& wif : infos.infos) { |
| 417 | auto size = wif.GetWindowSize(); |
| 418 | if (size.first <= 10 && size.second <= 10) { |
| 419 | continue; |
| 420 | } |
| 421 | info = wif; |
| 422 | break; |
| 423 | } |
| 424 | |
| 425 | if (info.win_handle) { |
| 426 | //LOG_INFO("Old handle : %p,", info.win_handle); |
| 427 | auto handle = GetParent(info.win_handle); |
| 428 | while (handle) { |
| 429 | info.win_handle = handle; |
| 430 | handle = GetParent(handle); |
| 431 | } |
| 432 | //LOG_INFO("New handle : %p,", info.win_handle); |
| 433 | } |
| 434 | |
| 435 | return info; |
| 436 | } |
| 437 | |
| 438 | void AppManagerWinImpl::AddFoundPid(const ProcessInfoPtr& target_pi) { |
| 439 | bool exist = false; |
nothing calls this directly
no outgoing calls
no test coverage detected