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

Method start_switch

plugins/vswitch/vswitch.cpp:131–153  ·  view source on GitHub ↗

* Initialize switching animation. * At this point, the calling plugin needs to have the custom renderer * ability set. */

Source from the content-addressed store, hash-verified

129 * ability set.
130 */
131 virtual void start_switch()
132 {
133 /* Setup wall */
134 wall->set_gap_size(gap);
135 wall->set_viewport(wall->get_workspace_rectangle(
136 output->wset()->get_current_workspace()));
137 wall->set_background_color(background_color);
138 wall->start_output_renderer();
139
140 if (overlay_view_node)
141 {
142 wf::scene::readd_front(wf::get_core().scene(), overlay_view_node);
143 }
144
145 output->render->add_effect(&post_render, OUTPUT_EFFECT_POST);
146
147 running = true;
148
149 /* Setup animation */
150 animation.dx.set(0, 0);
151 animation.dy.set(0, 0);
152 animation.start();
153 }
154
155 /**
156 * Start workspace switch animation towards the given workspace,

Callers

nothing calls this directly

Calls 9

readd_frontFunction · 0.85
set_gap_sizeMethod · 0.80
set_viewportMethod · 0.80
wsetMethod · 0.80
set_background_colorMethod · 0.80
start_output_rendererMethod · 0.80
get_current_workspaceMethod · 0.45
add_effectMethod · 0.45

Tested by

no test coverage detected