| 516 | } |
| 517 | |
| 518 | void 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 | |
| 534 | void view_action_interface_t::_assign_ws(wf::point_t point) |
| 535 | { |
nothing calls this directly
no test coverage detected