summaryrefslogtreecommitdiff
path: root/src/evdev-lid.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/evdev-lid.c')
-rw-r--r--src/evdev-lid.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/evdev-lid.c b/src/evdev-lid.c
index 010cb42..fe98e6e 100644
--- a/src/evdev-lid.c
+++ b/src/evdev-lid.c
@@ -224,8 +224,11 @@ lid_switch_pair_keyboard(struct evdev_device *lid_switch,
lid_switch->devname,
keyboard->devname);
- /* We don't init the event listener yet - we don't care
- * about keyboard events until the lid is closed */
+ /* We need to init the event listener now only if the reported state
+ * is closed. */
+ if (dispatch->lid_is_closed)
+ lid_switch_toggle_keyboard_listener(dispatch,
+ dispatch->lid_is_closed);
}
}