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

Method set_target_workspace

plugins/vswitch/vswitch.cpp:161–176  ·  view source on GitHub ↗

* Start workspace switch animation towards the given workspace, * and set that workspace as current. * * @param workspace The new target workspace. */

Source from the content-addressed store, hash-verified

159 * @param workspace The new target workspace.
160 */
161 virtual void set_target_workspace(point_t workspace)
162 {
163 point_t cws = output->wset()->get_current_workspace();
164
165 animation.dx.set(animation.dx + cws.x - workspace.x, 0);
166 animation.dy.set(animation.dy + cws.y - workspace.y, 0);
167 animation.start();
168
169 std::vector<wayfire_toplevel_view> fixed_views;
170 if (overlay_view)
171 {
172 fixed_views.push_back(overlay_view);
173 }
174
175 output->wset()->set_workspace(workspace, fixed_views);
176 }
177
178 /**
179 * Set the overlay view. It will be hidden from the normal workspace layers

Callers 1

add_directionMethod · 0.80

Calls 3

wsetMethod · 0.80
get_current_workspaceMethod · 0.45
set_workspaceMethod · 0.45

Tested by

no test coverage detected