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

Method _move

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

Source from the content-addressed store, hash-verified

500}
501
502void 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
518void view_action_interface_t::_resize(int w, int h)
519{

Callers

nothing calls this directly

Calls 5

clampFunction · 0.85
get_pending_geometryMethod · 0.80
get_outputMethod · 0.45
moveMethod · 0.45

Tested by

no test coverage detected