aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin J. Pohly <djpohly@gmail.com>2020-06-07 01:11:46 -0500
committerDevin J. Pohly <djpohly@gmail.com>2020-06-07 01:12:02 -0500
commit8c0afa7c738752c18970209365fd289b1005008a (patch)
treeaec57753abdc56e05fe2baf1d86a158dca29263f
parent2598100d53e6897bd0f7fed2df2230a91d4813e7 (diff)
send xdg_decoration configure right after create
Thanks to @cedws for pointing this out!
-rw-r--r--dwl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/dwl.c b/dwl.c
index a29f792..bd6b653 100644
--- a/dwl.c
+++ b/dwl.c
@@ -500,13 +500,14 @@ void
createxdeco(struct wl_listener *listener, void *data)
{
struct wlr_xdg_toplevel_decoration_v1 *wlr_deco = data;
- Decoration *d;
+ Decoration *d = wlr_deco->data = calloc(1, sizeof(*d));
- d = wlr_deco->data = calloc(1, sizeof(*d));
wl_signal_add(&wlr_deco->events.request_mode, &d->request_mode);
d->request_mode.notify = getxdecomode;
wl_signal_add(&wlr_deco->events.destroy, &d->destroy);
d->destroy.notify = destroyxdeco;
+
+ getxdecomode(&d->request_mode, wlr_deco);
}