mirror of
https://github.com/swaywm/sway.git
synced 2025-10-29 05:40:18 -04:00
ipc: add an input event
This adds an ipc event related to input devices. Currently the following changes are supported: - added: when an input device becomes available - removed: when an input device is no longer available - xkb_keymap_changed: (keyboards only) the keymap changed - xkb_layout_changed: (keyboards only) the effective layout changed
This commit is contained in:
parent
36aa67e549
commit
6effca7b61
7 changed files with 107 additions and 0 deletions
|
|
@ -34,6 +34,7 @@ enum ipc_command_type {
|
|||
|
||||
// sway-specific event types
|
||||
IPC_EVENT_BAR_STATE_UPDATE = ((1<<31) | 20),
|
||||
IPC_EVENT_INPUT = ((1<<31) | 21),
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ struct sway_keyboard {
|
|||
struct sway_seat_device *seat_device;
|
||||
|
||||
struct xkb_keymap *keymap;
|
||||
xkb_layout_index_t effective_layout;
|
||||
|
||||
struct wl_listener keyboard_key;
|
||||
struct wl_listener keyboard_modifiers;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#define _SWAY_IPC_SERVER_H
|
||||
#include <sys/socket.h>
|
||||
#include "sway/config.h"
|
||||
#include "sway/input/input-manager.h"
|
||||
#include "sway/tree/container.h"
|
||||
#include "ipc.h"
|
||||
|
||||
|
|
@ -19,5 +20,6 @@ void ipc_event_bar_state_update(struct bar_config *bar);
|
|||
void ipc_event_mode(const char *mode, bool pango);
|
||||
void ipc_event_shutdown(const char *reason);
|
||||
void ipc_event_binding(struct sway_binding *binding);
|
||||
void ipc_event_input(const char *change, struct sway_input_device *device);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue