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

Method _resize

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

Source from the content-addressed store, hash-verified

516}
517
518void view_action_interface_t::_resize(int w, int h)
519{
520 // Clamp w and h to sane values. Do not allow to get bigger then output. Do not
521 // allow to get smaller then 40x30.
522 auto output = _view->get_output();
523 if (output != nullptr)
524 {
525 auto dimensions = output->get_screen_size();
526
527 w = std::clamp(w, 40, dimensions.width);
528 h = std::clamp(h, 30, dimensions.height);
529
530 _view->resize(w, h);
531 }
532}
533
534void view_action_interface_t::_assign_ws(wf::point_t point)
535{

Callers

nothing calls this directly

Calls 4

clampFunction · 0.85
get_screen_sizeMethod · 0.80
get_outputMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected