aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/keyboard.c
diff options
context:
space:
mode:
authorLibravatar Mattias Eriksson <snaggen@mayam.com>2018-04-17 09:54:02 +0200
committerLibravatar Mattias Eriksson <snaggen@mayam.com>2018-05-13 00:30:09 +0200
commit8fbafbfab5671d56dd469f2205b7906c4a7f7c7c (patch)
treeab4eab0020d97dc5091b72479c383989ccc84729 /sway/input/keyboard.c
parentMerge pull request #1967 from emersion/remove-xdg-popup-unmap (diff)
downloadsway-8fbafbfab5671d56dd469f2205b7906c4a7f7c7c.tar.gz
sway-8fbafbfab5671d56dd469f2205b7906c4a7f7c7c.tar.zst
sway-8fbafbfab5671d56dd469f2205b7906c4a7f7c7c.zip
Idle handling for dpms/lockscreen et al
Swayidle handles idle events and allows for dpms and lockscreen handling. It also handles systemd sleep events, and can raise a lockscreen on sleep Fixes #541
Diffstat (limited to 'sway/input/keyboard.c')
-rw-r--r--sway/input/keyboard.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c
index dbf2ce01..c07557db 100644
--- a/sway/input/keyboard.c
+++ b/sway/input/keyboard.c
@@ -2,6 +2,7 @@
2#include <limits.h> 2#include <limits.h>
3#include <wlr/backend/multi.h> 3#include <wlr/backend/multi.h>
4#include <wlr/backend/session.h> 4#include <wlr/backend/session.h>
5#include <wlr/types/wlr_idle.h>
5#include "sway/input/seat.h" 6#include "sway/input/seat.h"
6#include "sway/input/keyboard.h" 7#include "sway/input/keyboard.h"
7#include "sway/input/input-manager.h" 8#include "sway/input/input-manager.h"
@@ -330,6 +331,7 @@ static void handle_keyboard_key(struct wl_listener *listener, void *data) {
330 struct wlr_seat *wlr_seat = keyboard->seat_device->sway_seat->wlr_seat; 331 struct wlr_seat *wlr_seat = keyboard->seat_device->sway_seat->wlr_seat;
331 struct wlr_input_device *wlr_device = 332 struct wlr_input_device *wlr_device =
332 keyboard->seat_device->input_device->wlr_device; 333 keyboard->seat_device->input_device->wlr_device;
334 wlr_idle_notify_activity(keyboard->seat_device->sway_seat->input->server->idle, wlr_seat);
333 struct wlr_event_keyboard_key *event = data; 335 struct wlr_event_keyboard_key *event = data;
334 336
335 xkb_keycode_t keycode = event->keycode + 8; 337 xkb_keycode_t keycode = event->keycode + 8;