mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-23 21:37:53 -04:00
fix: fix ov_no_resize in swallow
This commit is contained in:
parent
a6a765caff
commit
f328c2721c
2 changed files with 22 additions and 2 deletions
|
|
@ -1064,6 +1064,10 @@ void init_fadeout_client(Client *c) {
|
|||
|
||||
wlr_scene_node_set_enabled(&c->scene->node, true);
|
||||
client_set_border_color(c, config.bordercolor);
|
||||
if (c->overview_scene_surface) {
|
||||
wlr_scene_node_destroy(&c->overview_scene_surface->node);
|
||||
c->overview_scene_surface = NULL;
|
||||
}
|
||||
fadeout_client->scene =
|
||||
wlr_scene_tree_snapshot(&c->scene->node, layers[LyrFadeOut]);
|
||||
wlr_scene_node_set_enabled(&c->scene->node, false);
|
||||
|
|
|
|||
20
src/mango.c
20
src/mango.c
|
|
@ -1212,10 +1212,21 @@ void swallow(Client *c, Client *w) {
|
|||
c->master_mfact_per = w->master_mfact_per;
|
||||
c->scroller_proportion = w->scroller_proportion;
|
||||
c->isglobal = w->isglobal;
|
||||
c->overview_backup_geom = w->overview_backup_geom;
|
||||
|
||||
/* 调整 w 的邻居指针,让它们指向 c */
|
||||
c->stack_proportion = w->stack_proportion;
|
||||
|
||||
if (w->overview_scene_surface) {
|
||||
wlr_scene_node_destroy(&w->scene_surface->node);
|
||||
w->scene_surface = w->overview_scene_surface;
|
||||
w->overview_scene_surface = NULL;
|
||||
}
|
||||
|
||||
if (c->mon && c->mon->isoverview) {
|
||||
overview_backup_surface(c);
|
||||
}
|
||||
|
||||
/* 全局链表替换 */
|
||||
wl_list_insert(&w->link, &c->link);
|
||||
wl_list_insert(&w->flink, &c->flink);
|
||||
|
|
@ -6074,11 +6085,16 @@ uint32_t want_restore_fullscreen(Client *target_client) {
|
|||
}
|
||||
|
||||
void overview_backup_surface(Client *c) {
|
||||
|
||||
if (c->overview_scene_surface) {
|
||||
return;
|
||||
}
|
||||
|
||||
struct wlr_box clip_box;
|
||||
clip_box.x = 0;
|
||||
clip_box.y = 0;
|
||||
clip_box.width = c->geom.width - 2 * config.borderpx;
|
||||
clip_box.height = c->geom.height - 2 * config.borderpx;
|
||||
clip_box.width = c->overview_backup_geom.width - 2 * config.borderpx;
|
||||
clip_box.height = c->overview_backup_geom.height - 2 * config.borderpx;
|
||||
|
||||
c->overview_scene_surface = c->scene_surface;
|
||||
wlr_scene_node_set_enabled(&c->scene_surface->node, true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue