mirror of
https://github.com/swaywm/sway.git
synced 2025-11-07 13:29:56 -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
|
|
@ -39,6 +39,7 @@ enum sway_seat_operation {
|
|||
OP_NONE,
|
||||
OP_DOWN,
|
||||
OP_MOVE_FLOATING,
|
||||
OP_MOVE_TILING,
|
||||
OP_RESIZE_FLOATING,
|
||||
OP_RESIZE_TILING,
|
||||
};
|
||||
|
|
@ -64,6 +65,9 @@ struct sway_seat {
|
|||
// Operations (drag and resize)
|
||||
enum sway_seat_operation operation;
|
||||
struct sway_container *op_container;
|
||||
struct sway_node *op_target_node; // target for tiling move
|
||||
enum wlr_edges op_target_edge;
|
||||
struct wlr_box op_drop_box;
|
||||
enum wlr_edges op_resize_edge;
|
||||
uint32_t op_button;
|
||||
bool op_resize_preserve_ratio;
|
||||
|
|
@ -175,6 +179,9 @@ void seat_begin_down(struct sway_seat *seat, struct sway_container *con,
|
|||
void seat_begin_move_floating(struct sway_seat *seat,
|
||||
struct sway_container *con, uint32_t button);
|
||||
|
||||
void seat_begin_move_tiling(struct sway_seat *seat,
|
||||
struct sway_container *con, uint32_t button);
|
||||
|
||||
void seat_begin_resize_floating(struct sway_seat *seat,
|
||||
struct sway_container *con, uint32_t button, enum wlr_edges edge);
|
||||
|
||||
|
|
|
|||
|
|
@ -279,8 +279,11 @@ void container_add_child(struct sway_container *parent,
|
|||
void container_insert_child(struct sway_container *parent,
|
||||
struct sway_container *child, int i);
|
||||
|
||||
/**
|
||||
* Side should be 0 to add before, or 1 to add after.
|
||||
*/
|
||||
void container_add_sibling(struct sway_container *parent,
|
||||
struct sway_container *child);
|
||||
struct sway_container *child, int side);
|
||||
|
||||
void container_detach(struct sway_container *child);
|
||||
|
||||
|
|
|
|||
|
|
@ -126,4 +126,6 @@ void workspace_update_representation(struct sway_workspace *ws);
|
|||
|
||||
void workspace_get_box(struct sway_workspace *workspace, struct wlr_box *box);
|
||||
|
||||
size_t workspace_num_tiling_views(struct sway_workspace *ws);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue