mirror of
https://github.com/swaywm/sway.git
synced 2025-10-31 22:25:26 -04:00
Pass keys along from wayland backend to clients
This commit is contained in:
parent
af80b12add
commit
34277207fd
3 changed files with 26 additions and 2 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue