mirror of
https://github.com/swaywm/sway.git
synced 2025-11-19 06:59:52 -05:00
Add seat <seat> idle_{inhibit,wake} <sources...>
This adds seat configuration options which can be used to configure what events affect the idle behavior of sway. An example use-case is mobile devices: you would remove touch from the list of idle_wake events. This allows the phone to stay on while you're actively using it, but doesn't wake from idle on touch events while it's sleeping in your pocket.
This commit is contained in:
parent
f645f8efd6
commit
2f3c6cccf5
12 changed files with 159 additions and 11 deletions
|
|
@ -182,6 +182,15 @@ enum seat_keyboard_grouping {
|
|||
KEYBOARD_GROUP_KEYMAP
|
||||
};
|
||||
|
||||
enum sway_input_idle_source {
|
||||
IDLE_SOURCE_KEYBOARD = 1 << 0,
|
||||
IDLE_SOURCE_POINTER = 1 << 1,
|
||||
IDLE_SOURCE_TOUCH = 1 << 2,
|
||||
IDLE_SOURCE_TABLET_PAD = 1 << 3,
|
||||
IDLE_SOURCE_TABLET_TOOL = 1 << 4,
|
||||
IDLE_SOURCE_SWITCH = 1 << 5,
|
||||
};
|
||||
|
||||
/**
|
||||
* Options for multiseat and other misc device configurations
|
||||
*/
|
||||
|
|
@ -192,6 +201,7 @@ struct seat_config {
|
|||
int hide_cursor_timeout;
|
||||
enum seat_config_allow_constrain allow_constrain;
|
||||
enum seat_keyboard_grouping keyboard_grouping;
|
||||
uint32_t idle_inhibit_sources, idle_wake_sources;
|
||||
struct {
|
||||
char *name;
|
||||
int size;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue