__fdKeymap, __fdKeymapSize, __formatKeymap);
wl_keyboard();
- __keys.clear();
+ wl_array_init(&__keys);
}
DSWaylandKeyboardPrivate::~DSWaylandKeyboardPrivate()
{
if (__fdKeymap >= 0)
close(__fdKeymap);
+
+ wl_array_release(&__keys);
}
void DSWaylandKeyboardPrivate::keyboard_bind_resource(Resource *resource)
{
if (res.first == client)
{
- send_enter(res.second->handle, __compositor->nextSerial(), surface, __keys);
+ send_enter(res.second->handle, __compositor->nextSerial(), surface, &__keys);
}
};
uint32_t __repeatRate;
uint32_t __repeatDelay;
- std::string __keys;
+ struct ::wl_array __keys;
int __fdKeymap;
uint32_t __fdKeymapSize;
void DSWaylandTextInputPrivate::sendModifiersMap(std::string map)
{
+ struct ::wl_array map_data;
+
if (!__activatedResource)
{
DSLOG_WRN("DSWaylandTextInput", "No Text Input For Resource");
return;
}
- send_modifiers_map(__activatedResource->handle, map);
+ wl_array_init(&map_data);
+ char *strptr = (char *)wl_array_add(&map_data, map.length());
+ std::copy(map.c_str(), map.c_str() + map.length(), strptr);
+
+ send_modifiers_map(__activatedResource->handle, &map_data);
+
+ wl_array_release(&map_data);
}
void DSWaylandTextInputPrivate::sendKeysym(unsigned int serial, unsigned int time, unsigned int sym, unsigned int state, unsigned int modifiers)
void DSWaylandTizenInputDevicePrivate::sendDeviceInfo(void *resource, DSInputDevice *device)
{
- std::string axes;
+ struct ::wl_array axes;
+ wl_array_init(&axes);
- send_device_info((struct ::wl_resource *)resource, device->getName(), (uint32_t)device->getClass(), (uint32_t)device->getSubclass(), axes);
+ send_device_info((struct ::wl_resource *)resource, device->getName(), (uint32_t)device->getClass(), (uint32_t)device->getSubclass(), &axes);
+
+ wl_array_release(&axes);
}