mirror of
https://github.com/swaywm/sway.git
synced 2025-11-16 06:59:49 -05:00
Implement tiling_drag_threshold
Implements `tiling_drag_threshold <threshold>` to prevent accidental dragging of tiling containers. If a container (and all of its descendants) are unfocused and the tile bar is pressed, a threshold will be used before actually starting the drag. Once the threshold has been exceeded, the cursor will change to the grab icon and the operation will switch from `OP_MOVE_TILING_THRESHOLD` to `OP_MOVE_TILING`.
This commit is contained in:
parent
a96e86744f
commit
5bf4daf263
10 changed files with 91 additions and 2 deletions
|
|
@ -172,6 +172,7 @@ sway_cmd cmd_swaybg_command;
|
|||
sway_cmd cmd_swaynag_command;
|
||||
sway_cmd cmd_swap;
|
||||
sway_cmd cmd_tiling_drag;
|
||||
sway_cmd cmd_tiling_drag_threshold;
|
||||
sway_cmd cmd_title_align;
|
||||
sway_cmd cmd_title_format;
|
||||
sway_cmd cmd_titlebar_border_thickness;
|
||||
|
|
|
|||
|
|
@ -426,7 +426,9 @@ struct sway_config {
|
|||
bool auto_back_and_forth;
|
||||
bool show_marks;
|
||||
enum alignment title_align;
|
||||
|
||||
bool tiling_drag;
|
||||
int tiling_drag_threshold;
|
||||
|
||||
bool smart_gaps;
|
||||
int gaps_inner;
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ enum sway_seat_operation {
|
|||
OP_NONE,
|
||||
OP_DOWN,
|
||||
OP_MOVE_FLOATING,
|
||||
OP_MOVE_TILING_THRESHOLD,
|
||||
OP_MOVE_TILING,
|
||||
OP_RESIZE_FLOATING,
|
||||
OP_RESIZE_TILING,
|
||||
|
|
@ -186,6 +187,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_threshold(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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue