diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2019-01-01 08:45:21 -0500 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2019-01-02 23:33:33 +0100 |
commit | 5bf4daf2634929e7c94a6c7e56eda66d4667ca2f (patch) | |
tree | 1a5b0c1300c056cdd48f9d819e960e1336c46602 /include/sway/input/seat.h | |
parent | Fix fullscreen view rendering crash (diff) | |
download | sway-5bf4daf2634929e7c94a6c7e56eda66d4667ca2f.tar.gz sway-5bf4daf2634929e7c94a6c7e56eda66d4667ca2f.tar.zst sway-5bf4daf2634929e7c94a6c7e56eda66d4667ca2f.zip |
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`.
Diffstat (limited to 'include/sway/input/seat.h')
-rw-r--r-- | include/sway/input/seat.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h index d665c86e..a3c20346 100644 --- a/include/sway/input/seat.h +++ b/include/sway/input/seat.h | |||
@@ -39,6 +39,7 @@ enum sway_seat_operation { | |||
39 | OP_NONE, | 39 | OP_NONE, |
40 | OP_DOWN, | 40 | OP_DOWN, |
41 | OP_MOVE_FLOATING, | 41 | OP_MOVE_FLOATING, |
42 | OP_MOVE_TILING_THRESHOLD, | ||
42 | OP_MOVE_TILING, | 43 | OP_MOVE_TILING, |
43 | OP_RESIZE_FLOATING, | 44 | OP_RESIZE_FLOATING, |
44 | OP_RESIZE_TILING, | 45 | OP_RESIZE_TILING, |
@@ -186,6 +187,9 @@ void seat_begin_down(struct sway_seat *seat, struct sway_container *con, | |||
186 | void seat_begin_move_floating(struct sway_seat *seat, | 187 | void seat_begin_move_floating(struct sway_seat *seat, |
187 | struct sway_container *con, uint32_t button); | 188 | struct sway_container *con, uint32_t button); |
188 | 189 | ||
190 | void seat_begin_move_tiling_threshold(struct sway_seat *seat, | ||
191 | struct sway_container *con, uint32_t button); | ||
192 | |||
189 | void seat_begin_move_tiling(struct sway_seat *seat, | 193 | void seat_begin_move_tiling(struct sway_seat *seat, |
190 | struct sway_container *con, uint32_t button); | 194 | struct sway_container *con, uint32_t button); |
191 | 195 | ||