| 113 | } |
| 114 | |
| 115 | bool MatchesTargetClientSize(HWND hwnd, const Options &options) { |
| 116 | if (options.anchor_mode != AnchorMode::Client) { |
| 117 | return true; |
| 118 | } |
| 119 | |
| 120 | int width = 0; |
| 121 | int height = 0; |
| 122 | if (!GetClientSize(hwnd, width, height)) { |
| 123 | return false; |
| 124 | } |
| 125 | |
| 126 | return abs(width - options.window_width) <= kResizeTolerance && |
| 127 | abs(height - options.window_height) <= kResizeTolerance; |
| 128 | } |
| 129 | |
| 130 | bool MatchesTargetClientRect(HWND hwnd, const Rect &rect, const Metrics &initial_metrics) { |
| 131 | Metrics current_metrics = {}; |
no test coverage detected