mirror of
https://github.com/swaywm/sway.git
synced 2025-11-23 06:59:48 -05:00
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
This commit is contained in:
parent
9d607b7253
commit
8fbafbfab5
16 changed files with 703 additions and 2 deletions
|
|
@ -2,6 +2,7 @@
|
|||
#include <limits.h>
|
||||
#include <wlr/backend/multi.h>
|
||||
#include <wlr/backend/session.h>
|
||||
#include <wlr/types/wlr_idle.h>
|
||||
#include "sway/input/seat.h"
|
||||
#include "sway/input/keyboard.h"
|
||||
#include "sway/input/input-manager.h"
|
||||
|
|
@ -330,6 +331,7 @@ static void handle_keyboard_key(struct wl_listener *listener, void *data) {
|
|||
struct wlr_seat *wlr_seat = keyboard->seat_device->sway_seat->wlr_seat;
|
||||
struct wlr_input_device *wlr_device =
|
||||
keyboard->seat_device->input_device->wlr_device;
|
||||
wlr_idle_notify_activity(keyboard->seat_device->sway_seat->input->server->idle, wlr_seat);
|
||||
struct wlr_event_keyboard_key *event = data;
|
||||
|
||||
xkb_keycode_t keycode = event->keycode + 8;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue