MCPcopy Create free account
hub / github.com/WallBreaker2/op / MatchesTargetClientSize

Function MatchesTargetClientSize

libop/window/WindowLayout.cpp:115–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115bool 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
130bool MatchesTargetClientRect(HWND hwnd, const Rect &rect, const Metrics &initial_metrics) {
131 Metrics current_metrics = {};

Callers 1

ApplyFunction · 0.85

Calls 1

GetClientSizeFunction · 0.85

Tested by

no test coverage detected