diff options
author | emersion <contact@emersion.fr> | 2017-11-19 22:28:51 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2017-11-19 22:28:51 +0100 |
commit | 7904b625f0c6a8cef684d60ba136de1ba48e848e (patch) | |
tree | 3d7001509a6229e1b17a0f4c26960e720857c8a9 /include/rootston | |
parent | 7375931686e6a58c08a7727ce2f5d88e0be9adfa (diff) | |
parent | fae8d6289a470b8abcf36a5f4b0030ef504caf0b (diff) |
Merge branch 'master' into laggy-move-resize
Diffstat (limited to 'include/rootston')
-rw-r--r-- | include/rootston/config.h | 28 | ||||
-rw-r--r-- | include/rootston/cursor.h | 10 | ||||
-rw-r--r-- | include/rootston/desktop.h | 1 | ||||
-rw-r--r-- | include/rootston/seat.h | 24 |
4 files changed, 26 insertions, 37 deletions
diff --git a/include/rootston/config.h b/include/rootston/config.h index 71ee61c7..de20fb8e 100644 --- a/include/rootston/config.h +++ b/include/rootston/config.h @@ -3,6 +3,8 @@ #include <wlr/types/wlr_output_layout.h> #include <wlr/types/wlr_input_device.h> +#define ROOTS_CONFIG_DEFAULT_SEAT_NAME "seat0" + struct roots_output_config { char *name; enum wl_output_transform transform; @@ -17,9 +19,9 @@ struct roots_output_config { struct roots_device_config { char *name; + char *seat; char *mapped_output; struct wlr_box *mapped_box; - char *seat; struct wl_list link; }; @@ -33,6 +35,7 @@ struct roots_binding_config { struct roots_keyboard_config { char *name; + char *seat; uint32_t meta_key; char *rules; char *model; @@ -42,18 +45,22 @@ struct roots_keyboard_config { struct wl_list link; }; +struct roots_cursor_config { + char *seat; + char *mapped_output; + struct wlr_box *mapped_box; + char *theme; + struct wl_list link; +}; + struct roots_config { bool xwayland; - struct { - char *mapped_output; - struct wlr_box *mapped_box; - } cursor; - struct wl_list outputs; struct wl_list devices; struct wl_list bindings; struct wl_list keyboards; + struct wl_list cursors; char *config_path; char *startup_cmd; }; @@ -89,6 +96,13 @@ struct roots_device_config *roots_config_get_device(struct roots_config *config, * returns NULL. A NULL device returns the default config for keyboards. */ struct roots_keyboard_config *roots_config_get_keyboard( - struct roots_config *config, struct wlr_input_device *device); + struct roots_config *config, struct wlr_input_device *device); + +/** + * Get configuration for the cursor. If the cursor is not configured, returns + * NULL. A NULL seat_name returns the default config for cursors. + */ +struct roots_cursor_config *roots_config_get_cursor(struct roots_config *config, + const char *seat_name); #endif diff --git a/include/rootston/cursor.h b/include/rootston/cursor.h index f49b6439..e2a371bf 100644 --- a/include/rootston/cursor.h +++ b/include/rootston/cursor.h @@ -39,7 +39,6 @@ struct roots_cursor { uint32_t resize_edges; // Ring buffer of input events that could trigger move/resize/rotate int input_events_idx; - struct wl_list touch_points; struct roots_input_event input_events[16]; struct wl_listener motion; @@ -54,9 +53,6 @@ struct roots_cursor { struct wl_listener tool_axis; struct wl_listener tool_tip; - struct wl_listener pointer_grab_begin; - struct wl_listener pointer_grab_end; - struct wl_listener request_set_cursor; }; @@ -94,10 +90,4 @@ void roots_cursor_handle_tool_tip(struct roots_cursor *cursor, void roots_cursor_handle_request_set_cursor(struct roots_cursor *cursor, struct wlr_seat_pointer_request_set_cursor_event *event); -void roots_cursor_handle_pointer_grab_begin(struct roots_cursor *cursor, - struct wlr_seat_pointer_grab *grab); - -void roots_cursor_handle_pointer_grab_end(struct roots_cursor *cursor, - struct wlr_seat_pointer_grab *grab); - #endif diff --git a/include/rootston/desktop.h b/include/rootston/desktop.h index b809db43..10e5bbc6 100644 --- a/include/rootston/desktop.h +++ b/include/rootston/desktop.h @@ -50,6 +50,7 @@ struct roots_desktop { #ifdef HAS_XWAYLAND struct wlr_xwayland *xwayland; struct wl_listener xwayland_surface; + struct wl_listener xwayland_ready; #endif }; diff --git a/include/rootston/seat.h b/include/rootston/seat.h index bef515a4..dad8bbc4 100644 --- a/include/rootston/seat.h +++ b/include/rootston/seat.h @@ -4,24 +4,15 @@ #include "rootston/input.h" #include "rootston/keyboard.h" -struct roots_drag_icon { - struct wlr_surface *surface; - struct wl_list link; // roots_seat::drag_icons - bool mapped; - - int32_t sx; - int32_t sy; - - struct wl_listener surface_destroy; - struct wl_listener surface_commit; -}; - struct roots_seat { struct roots_input *input; struct wlr_seat *seat; struct roots_cursor *cursor; struct wl_list link; - struct wl_list drag_icons; + + // coordinates of the first touch point if it exists + int32_t touch_id; + double touch_x, touch_y; struct roots_view *focus; @@ -43,13 +34,6 @@ struct roots_touch { struct wl_list link; }; -struct roots_touch_point { - struct roots_touch *device; - int32_t slot; - double x, y; - struct wl_list link; -}; - struct roots_tablet_tool { struct roots_seat *seat; struct wlr_input_device *device; |