summaryrefslogtreecommitdiffstats
path: root/swaylock
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2015-12-12 15:19:23 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2015-12-12 15:19:23 -0500
commit34277207fd63b57ec8170f011a4115ef11c8ab0d (patch)
tree410240d8afd230219c0f0aeaf8c41b329925c880 /swaylock
parentImplement invoking `sway` as IPC client (diff)
downloadsway-34277207fd63b57ec8170f011a4115ef11c8ab0d.tar.gz
sway-34277207fd63b57ec8170f011a4115ef11c8ab0d.tar.zst
sway-34277207fd63b57ec8170f011a4115ef11c8ab0d.zip
Pass keys along from wayland backend to clients
Diffstat (limited to 'swaylock')
-rw-r--r--swaylock/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/swaylock/main.c b/swaylock/main.c
index c3743965..95921d53 100644
--- a/swaylock/main.c
+++ b/swaylock/main.c
@@ -29,6 +29,10 @@ void sway_terminate(void) {
29 exit(EXIT_FAILURE); 29 exit(EXIT_FAILURE);
30} 30}
31 31
32void notify_key(enum wl_keyboard_key_state state, xkb_keysym_t sym, uint32_t code, uint32_t codepoint) {
33 sway_log(L_INFO, "notified of key %c", (char)codepoint);
34}
35
32int main(int argc, char **argv) { 36int main(int argc, char **argv) {
33 init_log(L_INFO); 37 init_log(L_INFO);
34 surfaces = create_list(); 38 surfaces = create_list();
@@ -49,6 +53,8 @@ int main(int argc, char **argv) {
49 list_add(surfaces, window); 53 list_add(surfaces, window);
50 } 54 }
51 55
56 registry->input->notify = notify_key;
57
52 GError *err = NULL; 58 GError *err = NULL;
53 GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file(argv[1], &err); // TODO: Parse i3lock arguments 59 GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file(argv[1], &err); // TODO: Parse i3lock arguments
54 if (!pixbuf) { 60 if (!pixbuf) {