| 103 | } |
| 104 | |
| 105 | bool MatchesTargetSize(HWND hwnd, const Rect &rect) { |
| 106 | int width = 0; |
| 107 | int height = 0; |
| 108 | if (!GetWindowSize(hwnd, width, height)) { |
| 109 | return false; |
| 110 | } |
| 111 | |
| 112 | return abs(width - rect.width) <= kResizeTolerance && abs(height - rect.height) <= kResizeTolerance; |
| 113 | } |
| 114 | |
| 115 | bool MatchesTargetClientSize(HWND hwnd, const Options &options) { |
| 116 | if (options.anchor_mode != AnchorMode::Client) { |
no test coverage detected