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

Method create_switcher_view

plugins/single_plugins/switcher.cpp:648–674  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

646 }
647
648 SwitcherView create_switcher_view(wayfire_toplevel_view view)
649 {
650 /* we add a view transform if there isn't any.
651 *
652 * Note that a view might be visible on more than 1 place, so damage
653 * tracking doesn't work reliably. To circumvent this, we simply damage
654 * the whole output */
655 if (!view->get_transformed_node()->get_transformer(switcher_transformer))
656 {
657 if (view->minimized)
658 {
659 wf::scene::set_node_enabled(view->get_root_node(), true);
660 view->store_data(std::make_unique<wf::custom_data_t>(),
661 "switcher-minimized-showed");
662 }
663
664 view->get_transformed_node()->add_transformer(
665 std::make_shared<wf::scene::view_3d_transformer_t>(view),
666 wf::TRANSFORMER_3D, switcher_transformer);
667 }
668
669 SwitcherView sw{duration};
670 sw.view = view;
671 sw.position = SWITCHER_POSITION_CENTER;
672
673 return sw;
674 }
675
676 void render_view_scene(wayfire_view view, const wf::render_target_t& buffer)
677 {

Callers

nothing calls this directly

Calls 4

set_node_enabledFunction · 0.85
get_transformerMethod · 0.80
store_dataMethod · 0.80
add_transformerMethod · 0.45

Tested by

no test coverage detected