From c85ebc8fe50be0ba7e87d21302337b5263052741 Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Thu, 4 Jun 2020 15:04:56 -0700 Subject: fix: issue with freeing clients --- sys/cmd/dway/dway.h | 41 +++++++++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 6 deletions(-) (limited to 'sys/cmd/dway/dway.h') diff --git a/sys/cmd/dway/dway.h b/sys/cmd/dway/dway.h index 4fce74b..838e035 100644 --- a/sys/cmd/dway/dway.h +++ b/sys/cmd/dway/dway.h @@ -10,9 +10,15 @@ #include #include #include +#include #include +#include +#include +#include +#include #include #include +#include #include #include #include @@ -21,14 +27,19 @@ #include #include #include +#include #include +#include #include #include #include -#include "xdg-shell-protocol.h" -#include +#include "xdg-shell.h" +#include "wlr-layer-shell.h" +#include +#include +#include #include /* main types */ @@ -41,6 +52,7 @@ typedef struct Keyboard Keyboard; typedef struct Monitor Monitor; typedef struct Layout Layout; typedef struct Client Client; +typedef struct Deco Deco; typedef struct Payload Payload; typedef struct Rule Rule; @@ -151,18 +163,29 @@ struct Client struct wl_list tiles; struct wl_list stack; struct wl_list focus; - } pos; + } link; struct { struct wl_listener map; struct wl_listener unmap; struct wl_listener free; } ev; - int bw; - uint tags; - int floating; + int bw; + uint tags; + int floating; Monitor *m; }; +struct Deco +{ + struct wl_list link; + struct wlr_server_decoration *wlr; + + struct { + struct wl_listener free; + struct wl_listener mode; + } ev; +}; + struct Payload { struct wlr_output *dev; @@ -205,6 +228,12 @@ static void ev·mapclient(struct wl_listener *ev, void *arg); static void ev·unmapclient(struct wl_listener *ev, void *arg); static void ev·freeclient(struct wl_listener *ev, void *arg); +static void ev·newdecoration(struct wl_listener *ev, void *arg); +static void ev·freedecoration(struct wl_listener *ev, void *arg); +static void ev·modedecoration(struct wl_listener *ev, void *arg); + +static void ev·newlayershell(struct wl_listener *ev, void *arg); + static void ev·setcursor(struct wl_listener *ev, void *arg); static void ev·setsel(struct wl_listener *ev, void *arg); static void ev·setpsel(struct wl_listener *ev, void *arg); -- cgit v1.2.1