Start moving to a workspace to the left/right using the keyboard */
| 449 | |
| 450 | /* Start moving to a workspace to the left/right using the keyboard */ |
| 451 | bool move_vp(int dir) |
| 452 | { |
| 453 | if (!activate()) |
| 454 | { |
| 455 | return false; |
| 456 | } |
| 457 | |
| 458 | /* After the rotation is done, we want to exit cube and focus the target |
| 459 | * workspace */ |
| 460 | animation.in_exit = true; |
| 461 | |
| 462 | /* Set up rotation target to the next workspace in the given direction, |
| 463 | * and reset other attribs */ |
| 464 | reset_attribs(); |
| 465 | animation.cube_animation.rotation.restart_with_end( |
| 466 | animation.cube_animation.rotation.end - dir * animation.side_angle); |
| 467 | |
| 468 | animation.cube_animation.start(); |
| 469 | update_view_matrix(); |
| 470 | output->render->schedule_redraw(); |
| 471 | |
| 472 | return true; |
| 473 | } |
| 474 | |
| 475 | /* Initiate with an button grab. */ |
| 476 | bool input_grabbed() |
no test coverage detected