Devin J. Pohly 2020-08-02 18:40:33 -05:00
parent da5deab083
commit 7856cdc1bf
1 changed files with 11 additions and 11 deletions

22
dwl.c
View File

@ -177,6 +177,7 @@ static Monitor *dirtomon(int dir);
static void focusclient(Client *old, Client *c, int lift); static void focusclient(Client *old, Client *c, int lift);
static void focusmon(const Arg *arg); static void focusmon(const Arg *arg);
static void focusstack(const Arg *arg); static void focusstack(const Arg *arg);
static Client *focustop(Monitor *m);
static Atom getatom(xcb_connection_t *xc, const char *name); static Atom getatom(xcb_connection_t *xc, const char *name);
static void getxdecomode(struct wl_listener *listener, void *data); static void getxdecomode(struct wl_listener *listener, void *data);
static void incnmaster(const Arg *arg); static void incnmaster(const Arg *arg);
@ -185,7 +186,6 @@ static int keybinding(uint32_t mods, xkb_keysym_t sym);
static void keypress(struct wl_listener *listener, void *data); static void keypress(struct wl_listener *listener, void *data);
static void keypressmod(struct wl_listener *listener, void *data); static void keypressmod(struct wl_listener *listener, void *data);
static void killclient(const Arg *arg); static void killclient(const Arg *arg);
static Client *focustop(Monitor *m);
static void maprequest(struct wl_listener *listener, void *data); static void maprequest(struct wl_listener *listener, void *data);
static void motionabsolute(struct wl_listener *listener, void *data); static void motionabsolute(struct wl_listener *listener, void *data);
static void motionnotify(uint32_t time); static void motionnotify(uint32_t time);
@ -747,6 +747,16 @@ focusstack(const Arg *arg)
focusclient(sel, c, 1); focusclient(sel, c, 1);
} }
Client *
focustop(Monitor *m)
{
Client *c;
wl_list_for_each(c, &fstack, flink)
if (VISIBLEON(c, m))
return c;
return NULL;
}
Atom Atom
getatom(xcb_connection_t *xc, const char *name) getatom(xcb_connection_t *xc, const char *name)
{ {
@ -888,16 +898,6 @@ killclient(const Arg *arg)
wlr_xdg_toplevel_send_close(sel->surface.xdg); wlr_xdg_toplevel_send_close(sel->surface.xdg);
} }
Client *
focustop(Monitor *m)
{
Client *c;
wl_list_for_each(c, &fstack, flink)
if (VISIBLEON(c, m))
return c;
return NULL;
}
void void
maprequest(struct wl_listener *listener, void *data) maprequest(struct wl_listener *listener, void *data)
{ {