summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2015-12-12 15:19:23 -0500
committerDrew DeVault <sir@cmpwn.com>2015-12-12 15:19:23 -0500
commit16cb8ddd8e9b37c269c4feeba69899520d4f43f4 (patch)
tree285a739aac715dccdac3ce25256ddc5c1c1b9f8b /main.c
parentf7f73f6299ce203d1d36ef0086e4e2157a033dc8 (diff)
Pass keys along from wayland backend to clients
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/main.c b/main.c
index c374396..95921d5 100644
--- a/main.c
+++ b/main.c
@@ -29,6 +29,10 @@ void sway_terminate(void) {
exit(EXIT_FAILURE);
}
+void notify_key(enum wl_keyboard_key_state state, xkb_keysym_t sym, uint32_t code, uint32_t codepoint) {
+ sway_log(L_INFO, "notified of key %c", (char)codepoint);
+}
+
int main(int argc, char **argv) {
init_log(L_INFO);
surfaces = create_list();
@@ -49,6 +53,8 @@ int main(int argc, char **argv) {
list_add(surfaces, window);
}
+ registry->input->notify = notify_key;
+
GError *err = NULL;
GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file(argv[1], &err); // TODO: Parse i3lock arguments
if (!pixbuf) {