From 93e9672953d849288f27ff3d977cc1c1ff111da8 Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Mon, 4 Oct 2021 11:33:07 -0700 Subject: feat(wm): keyboard focus corrected --- sys/cmd/wm/wm.h | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'sys/cmd/wm/wm.h') diff --git a/sys/cmd/wm/wm.h b/sys/cmd/wm/wm.h index f6ff752..2e9ea9f 100644 --- a/sys/cmd/wm/wm.h +++ b/sys/cmd/wm/wm.h @@ -3,6 +3,7 @@ #include #include #include +#include #define WLR_USE_UNSTABLE #include @@ -15,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -49,7 +51,7 @@ enum { - CursorPassthrough, + CursorNormal, CursorMove, CursorResize, }; @@ -88,12 +90,12 @@ struct Key Arg arg; }; -struct Button +struct Button { - uint mod; - uint button; - void (*func)(const Arg *); - const Arg arg; + uint modifier; + uint code; + void (*function)(Arg *); + Arg arg; }; struct Keyboard @@ -233,6 +235,7 @@ struct Server struct { struct wlr_seat *seat; struct wl_list keyboards; + struct wlr_idle *idle; } input; struct { @@ -288,10 +291,13 @@ void focus(Client *, int lift); void resize(Client *, int x, int y, int w, int h, int interact); void attach(Client *, Monitor *, uint tags); -Client* client_at(double, double, struct wlr_surface **, double *, double *); -int client_has(Client *, double, double, struct wlr_surface **, double *, double *); +Client *client_at(double x, double y); +struct wlr_surface *client_surface_at(Client *, double cx, double cy, double *sx, double *sy); +struct wlr_surface *top_surface(Client *); -void setinteractive(Client *client, int mode, uint32 edges); // XXX: deprecate +void *move_client(Arg *arg); +void *float_client(Arg *arg); +void *resize_client(Arg *arg); /* monitor.c */ void tile(Monitor *); -- cgit v1.2.1