WIP refacto keyboard.c

This commit is contained in:
Stacy Harper
2021-08-26 09:16:47 +02:00
committed by John Sullivan
parent ff92a92086
commit e73316bd7c
5 changed files with 41 additions and 37 deletions

10
main.c
View File

@ -8,7 +8,6 @@
#include <wayland-client.h>
#include <wchar.h>
#include "drw.h"
#include "keyboard.h"
#include "config.h"
@ -42,6 +41,7 @@ static uint32_t anchor = ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM |
/* application state */
static bool run_display = true;
static int cur_x = -1, cur_y = -1;
static struct kbd keyboard;
/* event handler prototypes */
static void wl_pointer_enter(void *data, struct wl_pointer *wl_pointer,
@ -333,6 +333,14 @@ main(int argc, char **argv) {
if ((tmp = getenv("WVKBD_HEIGHT")))
height = atoi(tmp);
/* keyboard settings */
keyboard.layers = (enum layout_id *) &layers;
keyboard.scheme = scheme;
keyboard.layer_index = 0;
keyboard.scheme1 = scheme1;
keyboard.scheme1 = scheme1;
int i;
for (i = 1; argv[i]; i++) {
if ((!strcmp(argv[i], "-v")) || (!strcmp(argv[i], "--version"))) {