libobs: Map wayland keymap with MAP_PRIVATE

Wayland clients are required to use MAP_PRIVATE starting with version 7
of the wl_seat protocol.

Signed-off-by: Julian Orth <ju.orth@gmail.com>
This commit is contained in:
Julian Orth 2022-02-16 15:58:21 +01:00 committed by Georges Basile Stavracas Neto
parent 6a3043abd2
commit 99a6c97b9e

View File

@ -84,7 +84,7 @@ static void platform_keyboard_keymap(void *data, struct wl_keyboard *keyboard,
UNUSED_PARAMETER(format);
obs_hotkeys_platform_t *plat = (obs_hotkeys_platform_t *)data;
char *keymap_shm = mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0);
char *keymap_shm = mmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, 0);
if (keymap_shm == MAP_FAILED) {
close(fd);
return;