summaryrefslogtreecommitdiff
path: root/src/lib/efl_wl
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-01-24 16:28:49 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-01-24 16:31:26 -0500
commitbd41e4626fdcab15e5f0bb9ecd13b9249537fa67 (patch)
treebdafe15adf827ee2a6384aef0630a0ef22e5f0da /src/lib/efl_wl
parent94b6ad8448c5fe157c5b77435eb7c3873d778920 (diff)
efl-wl: don't leak xkb mmaps when running under x11
ref a32735e9a7bc537430d155a4af853d498dda2009
Diffstat (limited to 'src/lib/efl_wl')
-rw-r--r--src/lib/efl_wl/efl_wl.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c
index fd02aed44a..4c16eb6c33 100644
--- a/src/lib/efl_wl/efl_wl.c
+++ b/src/lib/efl_wl/efl_wl.c
@@ -3710,13 +3710,13 @@ seat_keymap_update(Comp_Seat *s)
3710 Eina_Tmpstr *file; 3710 Eina_Tmpstr *file;
3711 xkb_mod_mask_t latched = 0, locked = 0; 3711 xkb_mod_mask_t latched = 0, locked = 0;
3712 3712
3713 if (s->kbd.keymap_mem) munmap(s->kbd.keymap_mem, s->kbd.keymap_mem_size);
3714 if (s->kbd.keymap_fd > -1) close(s->kbd.keymap_fd);
3715
3713#ifdef HAVE_ECORE_X 3716#ifdef HAVE_ECORE_X
3714 if (!x11_kbd_keymap) 3717 if (!x11_kbd_keymap)
3715 { 3718 {
3716#endif 3719#endif
3717 if (s->kbd.keymap_mem) munmap(s->kbd.keymap_mem, s->kbd.keymap_mem_size);
3718 if (s->kbd.keymap_fd > -1) close(s->kbd.keymap_fd);
3719
3720 if (s->kbd.state) 3720 if (s->kbd.state)
3721 { 3721 {
3722 latched = xkb_state_serialize_mods(s->kbd.state, XKB_STATE_MODS_LATCHED); 3722 latched = xkb_state_serialize_mods(s->kbd.state, XKB_STATE_MODS_LATCHED);
@@ -4049,9 +4049,16 @@ static void
4049seat_kbd_destroy(Comp_Seat *s) 4049seat_kbd_destroy(Comp_Seat *s)
4050{ 4050{
4051 if (s->kbd.external) return; 4051 if (s->kbd.external) return;
4052 if (s->kbd.state) xkb_state_unref(s->kbd.state); 4052#ifdef HAVE_ECORE_X
4053 if (s->kbd.keymap) xkb_keymap_unref(s->kbd.keymap); 4053 if (!x11_kbd_keymap)
4054 if (s->kbd.context) xkb_context_unref(s->kbd.context); 4054 {
4055#endif
4056 if (s->kbd.state) xkb_state_unref(s->kbd.state);
4057 if (s->kbd.keymap) xkb_keymap_unref(s->kbd.keymap);
4058 if (s->kbd.context) xkb_context_unref(s->kbd.context);
4059#ifdef HAVE_ECORE_X
4060 }
4061#endif
4055 if (s->kbd.keymap_mem) munmap(s->kbd.keymap_mem, s->kbd.keymap_mem_size); 4062 if (s->kbd.keymap_mem) munmap(s->kbd.keymap_mem, s->kbd.keymap_mem_size);
4056 if (s->kbd.keymap_fd > -1) close(s->kbd.keymap_fd); 4063 if (s->kbd.keymap_fd > -1) close(s->kbd.keymap_fd);
4057 wl_array_release(&s->kbd.keys); 4064 wl_array_release(&s->kbd.keys);