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

Method add_direction

plugins/vswitch/vswitch.cpp:487–504  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

485 }
486
487 bool add_direction(wf::point_t delta, wayfire_view view = nullptr)
488 {
489 if (!is_active() && !start_switch())
490 {
491 return false;
492 }
493
494 if (view && ((view->role != wf::VIEW_ROLE_TOPLEVEL) || !view->is_mapped()))
495 {
496 view = nullptr;
497 }
498
499 algorithm->set_overlay_view(toplevel_cast(view));
500 algorithm->set_target_workspace(
501 output->wset()->get_current_workspace() + delta);
502
503 return true;
504 }
505
506 wf::signal::connection_t<wf::view_disappeared_signal> on_grabbed_view_disappear =
507 [=] (wf::view_disappeared_signal *ev)

Callers 1

Calls 6

toplevel_castFunction · 0.85
set_overlay_viewMethod · 0.80
set_target_workspaceMethod · 0.80
wsetMethod · 0.80
is_mappedMethod · 0.45
get_current_workspaceMethod · 0.45

Tested by

no test coverage detected