mirror of
https://github.com/swaywm/sway.git
synced 2025-11-05 13:29:51 -05:00
Implement tiling drag
Hold floating_modifier and drag a tiling view to a new location.
This commit is contained in:
parent
ec9c4de564
commit
8bb40c24c7
10 changed files with 274 additions and 6 deletions
|
|
@ -694,3 +694,16 @@ void workspace_get_box(struct sway_workspace *workspace, struct wlr_box *box) {
|
|||
box->width = workspace->width;
|
||||
box->height = workspace->height;
|
||||
}
|
||||
|
||||
static void count_tiling_views(struct sway_container *con, void *data) {
|
||||
if (con->view && !container_is_floating_or_child(con)) {
|
||||
size_t *count = data;
|
||||
*count += 1;
|
||||
}
|
||||
}
|
||||
|
||||
size_t workspace_num_tiling_views(struct sway_workspace *ws) {
|
||||
size_t count = 0;
|
||||
workspace_for_each_container(ws, count_tiling_views, &count);
|
||||
return count;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue