return;
}
- if(keymap) xkb_keymap_unref(keymap);
+ if(keymap)
+ {
+ xkb_keymap_unref(keymap);
+ keymap = NULL;
+ }
keymap = xkb_map_new_from_string(xkb_context, map, XKB_KEYMAP_FORMAT_TEXT_V1, 0);
if(!keymap) {
LOGE("... Failed to get keymap from fd(%d)\n", fd);
return;
xkb_context_unref(xkb_context);
+ xkb_context = NULL;
}
static void
return ECORE_CALLBACK_RENEW;
err:
- fd_hdl = NULL;
LOGE("Wayland Socket Error : %s\n", eina_error_msg_get(errno));
return ECORE_CALLBACK_CANCEL;
}
void _wl_shutdown(void)
{
- tizen_keyrouter_destroy(tz_keyrouter);
- wl_keyboard_release(keyboard);
- wl_seat_destroy(seat);
- wl_display_disconnect(display);
+ if (tz_keyrouter)
+ {
+ tizen_keyrouter_destroy(tz_keyrouter);
+ tz_keyrouter = NULL;
+ }
+ if (keyboard)
+ {
+ wl_keyboard_release(keyboard);
+ keyboard = NULL;
+ }
+ if (seat)
+ {
+ wl_seat_destroy(seat);
+ seat = NULL;
+ }
+
+ if (fd_hdl)
+ {
+ ecore_main_fd_handler_del(fd_hdl);
+ fd_hdl = NULL;
+ }
+
+ if (registry)
+ {
+ wl_registry_destroy(registry);
+ registry = NULL;
+ }
+
+ if (display)
+ {
+ wl_display_disconnect(display);
+ display = NULL;
+ }
}
void _keymap_shutdown(void)
{
- if(keymap) xkb_keymap_unref(keymap);
+ if(keymap)
+ {
+ xkb_keymap_unref(keymap);
+ keymap = NULL;
+ }
}
void wayland_input_init(void)