chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
terminal: reduce speed of morphing colors in modeset test
[elogind.git]
/
src
/
libsystemd-terminal
/
idev-keyboard.c
diff --git
a/src/libsystemd-terminal/idev-keyboard.c
b/src/libsystemd-terminal/idev-keyboard.c
index 647aade9326a990d2d88b0cc0e868f4e7d79cf11..d5936b7d236ab983b040a3b43ef0fb40ea1ac668 100644
(file)
--- a/
src/libsystemd-terminal/idev-keyboard.c
+++ b/
src/libsystemd-terminal/idev-keyboard.c
@@
-312,17
+312,19
@@
static int kbdctx_locale_props_changed_fn(sd_bus *bus,
sd_bus_message *signal,
void *userdata,
sd_bus_error *ret_err) {
sd_bus_message *signal,
void *userdata,
sd_bus_error *ret_err) {
- _cleanup_bus_message_unref_ sd_bus_message *m = NULL;
kbdctx *kc = userdata;
int r;
kc->slot_locale_get_all = sd_bus_slot_unref(kc->slot_locale_get_all);
kbdctx *kc = userdata;
int r;
kc->slot_locale_get_all = sd_bus_slot_unref(kc->slot_locale_get_all);
+ /* skip interface name */
+ r = sd_bus_message_skip(signal, "s");
+ if (r < 0)
+ goto error;
+
r = bus_message_map_properties_changed(bus, signal, kbdctx_locale_map, kc);
r = bus_message_map_properties_changed(bus, signal, kbdctx_locale_map, kc);
- if (r < 0) {
- log_debug("idev-keyboard: cannot handle PropertiesChanged from locale1: %s", strerror(-r));
- return r;
- }
+ if (r < 0)
+ goto error;
if (r > 0) {
r = kbdctx_query_locale(kc);
if (r > 0) {
r = kbdctx_query_locale(kc);
@@
-332,6
+334,10
@@
static int kbdctx_locale_props_changed_fn(sd_bus *bus,
kbdctx_refresh_keymap(kc);
return 0;
kbdctx_refresh_keymap(kc);
return 0;
+
+error:
+ log_debug("idev-keyboard: cannot handle PropertiesChanged from locale1: %s", strerror(-r));
+ return r;
}
static int kbdctx_setup_bus(kbdctx *kc) {
}
static int kbdctx_setup_bus(kbdctx *kc) {
@@
-551,6
+557,7
@@
int idev_keyboard_new(idev_device **out, idev_session *s, const char *name) {
static void keyboard_free(idev_device *d) {
idev_keyboard *k = keyboard_from_device(d);
static void keyboard_free(idev_device *d) {
idev_keyboard *k = keyboard_from_device(d);
+ xkb_state_unref(k->xkb_state);
free(k->repdata.keyboard.codepoints);
free(k->repdata.keyboard.keysyms);
free(k->evdata.keyboard.codepoints);
free(k->repdata.keyboard.codepoints);
free(k->repdata.keyboard.keysyms);
free(k->evdata.keyboard.codepoints);
@@
-763,8
+770,10
@@
static int keyboard_feed_evdev(idev_keyboard *k, idev_data *data) {
/* TODO: update LEDs */
}
/* TODO: update LEDs */
}
- if (num < 0)
+ if (num < 0) {
+ r = num;
goto error;
goto error;
+ }
r = keyboard_fill(k, &k->evdata, data->resync, ev->code, ev->value, num, keysyms);
if (r < 0)
r = keyboard_fill(k, &k->evdata, data->resync, ev->code, ev->value, num, keysyms);
if (r < 0)