Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/ghost/intern/GHOST_SystemWayland.cpp')
-rw-r--r--intern/ghost/intern/GHOST_SystemWayland.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp
index cf5ba550e55..93d85f33dda 100644
--- a/intern/ghost/intern/GHOST_SystemWayland.cpp
+++ b/intern/ghost/intern/GHOST_SystemWayland.cpp
@@ -1607,8 +1607,13 @@ static void keyboard_handle_keymap(
return;
}
- input->xkb_state = xkb_state_new(keymap);
-
+ struct xkb_state *xkb_state_next = xkb_state_new(keymap);
+ if (xkb_state_next) {
+ if (input->xkb_state) {
+ xkb_state_unref(input->xkb_state);
+ }
+ input->xkb_state = xkb_state_next;
+ }
xkb_keymap_unref(keymap);
}