KeySym obt_keyboard_keypress_to_keysym(XEvent *ev)
{
KeySym sym;
- gint r;
g_return_val_if_fail(ev->type == KeyPress, None);
sym = None;
- r = XLookupString(&ev->xkey, NULL, 0, &sym, NULL);
+ XLookupString(&ev->xkey, NULL, 0, &sym, NULL);
return sym;
}
{
if (--ic->ref < 1) {
xic_all = g_slist_remove(xic_all, ic);
- XDestroyIC(ic->xic);
+ if (ic->xic)
+ XDestroyIC(ic->xic);
g_slice_free(ObtIC, ic);
}
}