MCPcopy Create free account
hub / github.com/WayfireWM/wayfire / _validate_geometry

Method _validate_geometry

plugins/window-rules/view-action-interface.cpp:338–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

336}
337
338std::tuple<bool, int, int, int, int> view_action_interface_t::_validate_geometry(
339 const std::vector<variant_t> & args)
340{
341 auto arg_x = _expect_int(args, 1);
342 auto arg_y = _expect_int(args, 2);
343 auto arg_w = _expect_int(args, 3);
344 auto arg_h = _expect_int(args, 4);
345
346 if (std::get<0>(arg_x) && std::get<0>(arg_y) && std::get<0>(arg_w) &&
347 std::get<0>(arg_h))
348 {
349 return {true, std::get<1>(arg_x), std::get<1>(arg_y), std::get<1>(arg_w),
350 std::get<1>(arg_h)};
351 }
352
353 LOGE(
354 "View action interface: Invalid arguments. Expected 'set geometry int int int int.");
355
356 return {false, 0, 0, 0, 0};
357}
358
359std::tuple<bool, int, int> view_action_interface_t::_validate_position(
360 const std::vector<variant_t> & args)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected