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

Method start_swipe

plugins/single_plugins/vswipe.cpp:196–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194 };
195
196 void start_swipe(swipe_direction_t direction)
197 {
198 assert(direction != UNKNOWN);
199 state.direction = direction;
200
201 if (!output->activate_plugin(&grab_interface))
202 {
203 return;
204 }
205
206 input_grab->grab_input(wf::scene::layer::OVERLAY);
207 wf::get_core().seat->focus_output(output);
208
209 auto ws = output->wset()->get_current_workspace();
210 wall->set_background_color(background_color);
211 wall->set_gap_size(gap);
212 wall->set_viewport(wall->get_workspace_rectangle(ws));
213 wall->start_output_renderer();
214 output->render->add_effect(&post_frame, wf::OUTPUT_EFFECT_POST);
215 }
216
217 // XXX: how to determine this??
218 static constexpr double initial_direction_threshold = 0.05;

Callers

nothing calls this directly

Calls 11

activate_pluginMethod · 0.80
focus_outputMethod · 0.80
wsetMethod · 0.80
set_background_colorMethod · 0.80
set_gap_sizeMethod · 0.80
set_viewportMethod · 0.80
start_output_rendererMethod · 0.80
grab_inputMethod · 0.45
get_current_workspaceMethod · 0.45
add_effectMethod · 0.45

Tested by

no test coverage detected