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

Method tile_request

src/core/window-manager.cpp:211–249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211void window_manager_t::tile_request(wayfire_toplevel_view view,
212 uint32_t tiled_edges, std::optional<wf::point_t> ws)
213{
214 if (view->pending_fullscreen() || !view->get_output())
215 {
216 return;
217 }
218
219 const wf::point_t workspace = ws.value_or(view->get_output()->wset()->get_current_workspace());
220
221 view_tile_request_signal data;
222 data.view = view;
223 data.edges = tiled_edges;
224 data.workspace = workspace;
225 data.desired_size = tiled_edges ? view->get_output()->workarea->get_workarea() :
226 get_last_windowed_geometry(view).value_or(wf::geometry_t{0, 0, -1, -1});
227
228 update_last_windowed_geometry(view);
229 view->toplevel()->pending().tiled_edges = tiled_edges;
230 if (view->is_mapped())
231 {
232 view->get_output()->emit(&data);
233 }
234
235 if (!data.carried_out)
236 {
237 if (data.desired_size.width > 0)
238 {
239 // set geometry will commit the state
240 view->set_geometry(data.desired_size);
241 move_to_workspace(view, workspace);
242 } else
243 {
244 // Move will commit the tiled edges
245 move_to_workspace(view, workspace);
246 view->request_native_size();
247 }
248 }
249}
250
251void window_manager_t::fullscreen_request(wayfire_toplevel_view view,
252 wf::output_t *output, bool state, std::optional<wf::point_t> ws)

Callers 15

move_view_to_outputMethod · 0.80
wayfire_xwayland_viewMethod · 0.80
xdg_toplevel_view_tMethod · 0.80
createMethod · 0.80
maximizeMethod · 0.80
wayfire_moveClass · 0.80
executeMethod · 0.80
_maximizeMethod · 0.80
_unmaximizeMethod · 0.80
wayfire_gridClass · 0.80

Calls 10

move_to_workspaceFunction · 0.85
pending_fullscreenMethod · 0.80
wsetMethod · 0.80
get_workareaMethod · 0.80
get_outputMethod · 0.45
get_current_workspaceMethod · 0.45
is_mappedMethod · 0.45
emitMethod · 0.45
set_geometryMethod · 0.45
request_native_sizeMethod · 0.45

Tested by

no test coverage detected