aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/input/seat.h
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-07-20 09:28:22 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-07-22 23:10:19 +1000
commitff445cc85597ee6bfae01f03d3c246e2326f3981 (patch)
tree53c720bc54733d1660bffddf87291c887667d093 /include/sway/input/seat.h
parentUse wlr_keyboard_get_modifiers (diff)
downloadsway-ff445cc85597ee6bfae01f03d3c246e2326f3981.tar.gz
sway-ff445cc85597ee6bfae01f03d3c246e2326f3981.tar.zst
sway-ff445cc85597ee6bfae01f03d3c246e2326f3981.zip
Implement xdg shell request_move and request_resize events
Also does a few other related things: * Now uses enum wlr_edges instead of our own enum resize_edge * Now uses wlr_xcursor_get_resize_name and removes our own find_resize_edge_name * Renames drag to move for consistency
Diffstat (limited to 'include/sway/input/seat.h')
-rw-r--r--include/sway/input/seat.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h
index be1f3610..35a965ee 100644
--- a/include/sway/input/seat.h
+++ b/include/sway/input/seat.h
@@ -3,6 +3,7 @@
3 3
4#include <wlr/types/wlr_layer_shell.h> 4#include <wlr/types/wlr_layer_shell.h>
5#include <wlr/types/wlr_seat.h> 5#include <wlr/types/wlr_seat.h>
6#include <wlr/util/edges.h>
6#include "sway/input/input-manager.h" 7#include "sway/input/input-manager.h"
7 8
8struct sway_seat_device { 9struct sway_seat_device {
@@ -34,8 +35,6 @@ struct sway_drag_icon {
34 struct wl_listener destroy; 35 struct wl_listener destroy;
35}; 36};
36 37
37enum resize_edge;
38
39struct sway_seat { 38struct sway_seat {
40 struct wlr_seat *wlr_seat; 39 struct wlr_seat *wlr_seat;
41 struct sway_cursor *cursor; 40 struct sway_cursor *cursor;
@@ -57,11 +56,12 @@ struct sway_seat {
57 // Operations (drag and resize) 56 // Operations (drag and resize)
58 enum { 57 enum {
59 OP_NONE, 58 OP_NONE,
60 OP_DRAG, 59 OP_MOVE,
61 OP_RESIZE, 60 OP_RESIZE,
62 } operation; 61 } operation;
62
63 struct sway_container *op_container; 63 struct sway_container *op_container;
64 enum resize_edge op_resize_edge; 64 enum wlr_edges op_resize_edge;
65 uint32_t op_button; 65 uint32_t op_button;
66 bool op_resize_preserve_ratio; 66 bool op_resize_preserve_ratio;
67 double op_ref_lx, op_ref_ly; // cursor's x/y at start of op 67 double op_ref_lx, op_ref_ly; // cursor's x/y at start of op
@@ -150,4 +150,9 @@ bool seat_is_input_allowed(struct sway_seat *seat, struct wlr_surface *surface);
150 150
151void drag_icon_update_position(struct sway_drag_icon *icon); 151void drag_icon_update_position(struct sway_drag_icon *icon);
152 152
153void seat_begin_move(struct sway_seat *seat, struct sway_container *con);
154
155void seat_begin_resize(struct sway_seat *seat, struct sway_container *con,
156 uint32_t button, enum wlr_edges edge);
157
153#endif 158#endif