| 500 | } |
| 501 | |
| 502 | void view_action_interface_t::_move(int x, int y) |
| 503 | { |
| 504 | // Clamp x and y to sane values. Do not allow to move outside of workspace grid. |
| 505 | auto output = _view->get_output(); |
| 506 | if (output != nullptr) |
| 507 | { |
| 508 | auto grid = this->_get_workspace_grid_geometry(output); |
| 509 | auto view_geometry = _view->get_pending_geometry(); |
| 510 | view_geometry.x = x; |
| 511 | view_geometry.y = y; |
| 512 | |
| 513 | view_geometry = wf::clamp(view_geometry, grid); |
| 514 | _view->move(view_geometry.x, view_geometry.y); |
| 515 | } |
| 516 | } |
| 517 | |
| 518 | void view_action_interface_t::_resize(int w, int h) |
| 519 | { |
nothing calls this directly
no test coverage detected