make sure the parent is mapped prior set monitor and tags

このコミットが含まれているのは:
Leonardo Hernández Hernández 2022-09-10 23:45:14 -05:00
コミット fd67087a82
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: E538897EE11B9624
1個のファイルの変更6行の追加5行の削除

11
dwl.c
ファイルの表示

@ -1439,13 +1439,14 @@ mapnotify(struct wl_listener *listener, void *data)
wl_list_insert(&clients, &c->link); wl_list_insert(&clients, &c->link);
wl_list_insert(&fstack, &c->flink); wl_list_insert(&fstack, &c->flink);
/* Set initial monitor, tags, floating status, and focus */ /* Set initial monitor, tags, floating status, and focus:
if ((p = client_get_parent(c))) { * we always consider floating, clients that have parent and thus
/* Set the same monitor and tags than its parent */ * 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; c->isfloating = 1;
wlr_scene_node_reparent(c->scene, layers[LyrFloat]); 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->tags);
setmon(c, p->mon ? p->mon : selmon, p->tags);
} else { } else {
applyrules(c); applyrules(c);
} }