diff options
Diffstat (limited to 'sys/cmd/wm/xdg.c')
-rw-r--r-- | sys/cmd/wm/xdg.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/cmd/wm/xdg.c b/sys/cmd/wm/xdg.c index 07ddf53..d49cfb6 100644 --- a/sys/cmd/wm/xdg.c +++ b/sys/cmd/wm/xdg.c @@ -9,12 +9,16 @@ map(struct wl_listener *l, void *data) wl_list_insert(&server.client.list, &client->link); wl_list_insert(&server.client.stack, &client->stack); + wl_list_insert(&server.client.focus, &client->focus); - wlr_xdg_surface_get_geometry(client->xdg, &client->geo); - client->geo.width += 2 * client->border; - client->geo.height += 2 * client->border; + wlr_xdg_surface_get_geometry(client->xdg, &client->geometry); + client->geometry.width += 2 * client->border; + client->geometry.height += 2 * client->border; - focus(client, client->xdg->surface); + wlr_xdg_toplevel_set_tiled(client->xdg, + WLR_EDGE_TOP|WLR_EDGE_BOTTOM|WLR_EDGE_LEFT|WLR_EDGE_RIGHT + ); + focus(client, client->xdg->surface, 1); } static @@ -26,6 +30,7 @@ unmap(struct wl_listener *l, void *data) wl_list_remove(&client->link); wl_list_remove(&client->stack); + wl_list_remove(&client->focus); } static |