diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/config.h | 2 | ||||
-rw-r--r-- | include/sway/input/keyboard.h | 5 | ||||
-rw-r--r-- | include/sway/input/seat.h | 20 | ||||
-rw-r--r-- | include/sway/tree/layout.h | 1 |
4 files changed, 25 insertions, 3 deletions
diff --git a/include/sway/config.h b/include/sway/config.h index 81e9c382..e75b0664 100644 --- a/include/sway/config.h +++ b/include/sway/config.h @@ -30,7 +30,7 @@ struct sway_binding { bool release; bool locked; bool bindcode; - list_t *keys; + list_t *keys; // sorted in ascending order uint32_t modifiers; char *command; }; diff --git a/include/sway/input/keyboard.h b/include/sway/input/keyboard.h index e99a54b1..6713398e 100644 --- a/include/sway/input/keyboard.h +++ b/include/sway/input/keyboard.h @@ -21,7 +21,9 @@ struct sway_shortcut_state { * including duplicates when a keycode generates multiple key ids. */ uint32_t pressed_keycodes[SWAY_KEYBOARD_PRESSED_KEYS_CAP]; - int last_key_index; + uint32_t last_keycode; + uint32_t last_raw_modifiers; + size_t npressed; }; struct sway_keyboard { @@ -36,7 +38,6 @@ struct sway_keyboard { struct sway_shortcut_state state_keysyms_raw; struct sway_shortcut_state state_keycodes; struct sway_binding *held_binding; - uint32_t last_modifiers; }; struct sway_keyboard *sway_keyboard_create(struct sway_seat *seat, diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h index 2e4da438..1f7792ba 100644 --- a/include/sway/input/seat.h +++ b/include/sway/input/seat.h @@ -21,6 +21,19 @@ struct sway_seat_container { struct wl_listener destroy; }; +struct sway_drag_icon { + struct sway_seat *seat; + struct wlr_drag_icon *wlr_drag_icon; + struct wl_list link; // sway_root::drag_icons + + double x, y; // in layout-local coordinates + + struct wl_listener surface_commit; + struct wl_listener map; + struct wl_listener unmap; + struct wl_listener destroy; +}; + struct sway_seat { struct wlr_seat *wlr_seat; struct sway_cursor *cursor; @@ -35,8 +48,13 @@ struct sway_seat { // If exclusive_client is set, no other clients will receive input events struct wl_client *exclusive_client; + // Last touch point + int32_t touch_id; + double touch_x, touch_y; + struct wl_listener focus_destroy; struct wl_listener new_container; + struct wl_listener new_drag_icon; struct wl_list devices; // sway_seat_device::link @@ -114,4 +132,6 @@ struct seat_config *seat_get_config(struct sway_seat *seat); bool seat_is_input_allowed(struct sway_seat *seat, struct wlr_surface *surface); +void drag_icon_update_position(struct sway_drag_icon *icon); + #endif diff --git a/include/sway/tree/layout.h b/include/sway/tree/layout.h index cd131056..ba265623 100644 --- a/include/sway/tree/layout.h +++ b/include/sway/tree/layout.h @@ -28,6 +28,7 @@ struct sway_root { struct wl_listener output_layout_change; struct wl_list xwayland_unmanaged; // sway_xwayland_unmanaged::link + struct wl_list drag_icons; // sway_drag_icon::link struct wlr_texture *debug_tree; |