aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-09-10 23:45:14 -0500
committerLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-09-10 23:45:14 -0500
commitfd67087a82d52f79cb3f02f9048ee4dd603fd8a6 (patch)
tree8db0cc04a8b2ed7c369057af6d9d6c0658a831e6
parent77ba8e51276ce94515913091d669db21e856e8cd (diff)
make sure the parent is mapped prior set monitor and tags
-rw-r--r--dwl.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/dwl.c b/dwl.c
index bcc0804..be94832 100644
--- a/dwl.c
+++ b/dwl.c
@@ -1439,13 +1439,14 @@ mapnotify(struct wl_listener *listener, void *data)
wl_list_insert(&clients, &c->link);
wl_list_insert(&fstack, &c->flink);
- /* Set initial monitor, tags, floating status, and focus */
- if ((p = client_get_parent(c))) {
- /* Set the same monitor and tags than its parent */
+ /* Set initial monitor, tags, floating status, and focus:
+ * we always consider floating, clients that have parent and thus
+ * we set the same tags and monitor than its parent, if not
+ * try to apply rules for them */
+ if ((p = client_get_parent(c)) && client_is_mapped(p)) {
c->isfloating = 1;
wlr_scene_node_reparent(c->scene, layers[LyrFloat]);
- /* TODO recheck if !p->mon is possible with wlroots 0.16.0 */
- setmon(c, p->mon ? p->mon : selmon, p->tags);
+ setmon(c, p->mon, p->tags);
} else {
applyrules(c);
}