mirror of
https://github.com/swaywm/sway.git
synced 2026-04-27 06:46:25 -04:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
de5609ad55
16 changed files with 138 additions and 66 deletions
|
|
@ -183,6 +183,12 @@ struct seat_attachment_config {
|
|||
// TODO other things are configured here for some reason
|
||||
};
|
||||
|
||||
enum seat_config_hide_cursor_when_typing {
|
||||
HIDE_WHEN_TYPING_DEFAULT, // the default is currently disabled
|
||||
HIDE_WHEN_TYPING_ENABLE,
|
||||
HIDE_WHEN_TYPING_DISABLE,
|
||||
};
|
||||
|
||||
enum seat_config_allow_constrain {
|
||||
CONSTRAIN_DEFAULT, // the default is currently enabled
|
||||
CONSTRAIN_ENABLE,
|
||||
|
|
@ -218,6 +224,7 @@ struct seat_config {
|
|||
int fallback; // -1 means not set
|
||||
list_t *attachments; // list of seat_attachment configs
|
||||
int hide_cursor_timeout;
|
||||
enum seat_config_hide_cursor_when_typing hide_cursor_when_typing;
|
||||
enum seat_config_allow_constrain allow_constrain;
|
||||
enum seat_config_shortcuts_inhibit shortcuts_inhibit;
|
||||
enum seat_keyboard_grouping keyboard_grouping;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
#include <wlr/types/wlr_pointer_gestures_v1.h>
|
||||
#include <wlr/types/wlr_surface.h>
|
||||
#include "sway/input/seat.h"
|
||||
#include "config.h"
|
||||
|
||||
#define SWAY_CURSOR_PRESSED_BUTTONS_CAP 32
|
||||
|
||||
|
|
@ -68,6 +69,10 @@ struct sway_cursor {
|
|||
|
||||
struct wl_event_source *hide_source;
|
||||
bool hidden;
|
||||
// This field is just a cache of the field in seat_config in order to avoid
|
||||
// costly seat_config lookups on every keypress. HIDE_WHEN_TYPING_DEFAULT
|
||||
// indicates that there is no cached value.
|
||||
enum seat_config_hide_cursor_when_typing hide_when_typing;
|
||||
|
||||
size_t pressed_button_count;
|
||||
};
|
||||
|
|
@ -94,6 +99,7 @@ void cursor_handle_activity(struct sway_cursor *cursor,
|
|||
struct wlr_input_device *device);
|
||||
void cursor_unhide(struct sway_cursor *cursor);
|
||||
int cursor_get_timeout(struct sway_cursor *cursor);
|
||||
void cursor_notify_key_press(struct sway_cursor *cursor);
|
||||
|
||||
void dispatch_cursor_button(struct sway_cursor *cursor,
|
||||
struct wlr_input_device *device, uint32_t time_msec, uint32_t button,
|
||||
|
|
@ -110,7 +116,7 @@ void cursor_set_image_surface(struct sway_cursor *cursor,
|
|||
struct wl_client *client);
|
||||
|
||||
void cursor_warp_to_container(struct sway_cursor *cursor,
|
||||
struct sway_container *container);
|
||||
struct sway_container *container, bool force);
|
||||
|
||||
void cursor_warp_to_workspace(struct sway_cursor *cursor,
|
||||
struct sway_workspace *workspace);
|
||||
|
|
|
|||
|
|
@ -16,13 +16,12 @@ struct sway_seatop_impl {
|
|||
void (*button)(struct sway_seat *seat, uint32_t time_msec,
|
||||
struct wlr_input_device *device, uint32_t button,
|
||||
enum wlr_button_state state);
|
||||
void (*pointer_motion)(struct sway_seat *seat, uint32_t time_msec,
|
||||
double dx, double dy);
|
||||
void (*pointer_motion)(struct sway_seat *seat, uint32_t time_msec);
|
||||
void (*pointer_axis)(struct sway_seat *seat,
|
||||
struct wlr_event_pointer_axis *event);
|
||||
void (*rebase)(struct sway_seat *seat, uint32_t time_msec);
|
||||
void (*tablet_tool_motion)(struct sway_seat *seat,
|
||||
struct sway_tablet_tool *tool, uint32_t time_msec, double dx, double dy);
|
||||
struct sway_tablet_tool *tool, uint32_t time_msec);
|
||||
void (*tablet_tool_tip)(struct sway_seat *seat, struct sway_tablet_tool *tool,
|
||||
uint32_t time_msec, enum wlr_tablet_tool_tip_state state);
|
||||
void (*end)(struct sway_seat *seat);
|
||||
|
|
@ -269,11 +268,7 @@ void seatop_button(struct sway_seat *seat, uint32_t time_msec,
|
|||
struct wlr_input_device *device, uint32_t button,
|
||||
enum wlr_button_state state);
|
||||
|
||||
/**
|
||||
* dx and dy are distances relative to previous position.
|
||||
*/
|
||||
void seatop_pointer_motion(struct sway_seat *seat, uint32_t time_msec,
|
||||
double dx, double dy);
|
||||
void seatop_pointer_motion(struct sway_seat *seat, uint32_t time_msec);
|
||||
|
||||
void seatop_pointer_axis(struct sway_seat *seat,
|
||||
struct wlr_event_pointer_axis *event);
|
||||
|
|
@ -283,7 +278,7 @@ void seatop_tablet_tool_tip(struct sway_seat *seat,
|
|||
enum wlr_tablet_tool_tip_state state);
|
||||
|
||||
void seatop_tablet_tool_motion(struct sway_seat *seat,
|
||||
struct sway_tablet_tool *tool, uint32_t time_msec, double dx, double dy);
|
||||
struct sway_tablet_tool *tool, uint32_t time_msec);
|
||||
|
||||
void seatop_rebase(struct sway_seat *seat, uint32_t time_msec);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue