input: use ro_anonymous_file to minimize duplication of keymap files
Since version 7 clients must use MAP_PRIVATE to map the keymap fd so we can use memfd_create in os_ro_anonymous_file_get_ref using RO_ANONYMOUS_FILE_MAPMODE_PRIVATE, for older version we use RO_ANONYMOUS_FILE_MAPMODE_SHARED to be compatibile with MAP_SHARED. Signed-off-by: Sebastian Wick <sebastian@sebastianwick.net>
This commit is contained in:
@@ -78,6 +78,7 @@ struct weston_pointer;
|
||||
struct linux_dmabuf_buffer;
|
||||
struct weston_recorder;
|
||||
struct weston_pointer_constraint;
|
||||
struct ro_anonymous_file;
|
||||
|
||||
enum weston_keyboard_modifier {
|
||||
MODIFIER_CTRL = (1 << 0),
|
||||
@@ -704,8 +705,7 @@ weston_pointer_start_drag(struct weston_pointer *pointer,
|
||||
struct wl_client *client);
|
||||
struct weston_xkb_info {
|
||||
struct xkb_keymap *keymap;
|
||||
size_t keymap_size;
|
||||
char *keymap_string;
|
||||
struct ro_anonymous_file *keymap_rofile;
|
||||
int32_t ref_count;
|
||||
xkb_mod_index_t shift_mod;
|
||||
xkb_mod_index_t caps_mod;
|
||||
|
||||
Reference in New Issue
Block a user