mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-02 09:01:43 -05:00
opt: avoid layout confusion after returning from the minimize state in activatex11 event
This commit is contained in:
parent
11da6487ad
commit
b0082b1fb8
1 changed files with 11 additions and 7 deletions
18
src/maomao.c
18
src/maomao.c
|
|
@ -7356,6 +7356,7 @@ void smartresizewin(const Arg *arg) {
|
||||||
#ifdef XWAYLAND
|
#ifdef XWAYLAND
|
||||||
void activatex11(struct wl_listener *listener, void *data) {
|
void activatex11(struct wl_listener *listener, void *data) {
|
||||||
Client *c = wl_container_of(listener, c, activate);
|
Client *c = wl_container_of(listener, c, activate);
|
||||||
|
bool need_arrange = false;
|
||||||
|
|
||||||
if (!c || c->iskilling || !c->foreign_toplevel || client_is_unmanaged(c))
|
if (!c || c->iskilling || !c->foreign_toplevel || client_is_unmanaged(c))
|
||||||
return;
|
return;
|
||||||
|
|
@ -7371,8 +7372,7 @@ void activatex11(struct wl_listener *listener, void *data) {
|
||||||
wlr_foreign_toplevel_handle_v1_set_minimized(c->foreign_toplevel, false);
|
wlr_foreign_toplevel_handle_v1_set_minimized(c->foreign_toplevel, false);
|
||||||
setborder_color(c);
|
setborder_color(c);
|
||||||
if (VISIBLEON(c, c->mon)) {
|
if (VISIBLEON(c, c->mon)) {
|
||||||
wlr_scene_node_set_enabled(&c->scene->node, true);
|
need_arrange = true;
|
||||||
client_set_suspended(c, false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -7380,14 +7380,18 @@ void activatex11(struct wl_listener *listener, void *data) {
|
||||||
view(&(Arg){.ui = c->tags}, true);
|
view(&(Arg){.ui = c->tags}, true);
|
||||||
wlr_xwayland_surface_activate(c->surface.xwayland, 1);
|
wlr_xwayland_surface_activate(c->surface.xwayland, 1);
|
||||||
focusclient(c, 1);
|
focusclient(c, 1);
|
||||||
|
need_arrange = false;
|
||||||
} else if (c != focustop(selmon)) {
|
} else if (c != focustop(selmon)) {
|
||||||
if (client_surface(c)->mapped)
|
|
||||||
client_set_border_color(
|
|
||||||
c,
|
|
||||||
urgentcolor); // 在使用窗口剪切补丁后,这里启动gdm-settings的字体更改那里点击就会崩溃,增加过滤条件为是toplevel窗口后似乎已经解决
|
|
||||||
c->isurgent = 1;
|
c->isurgent = 1;
|
||||||
printstatus();
|
if (client_surface(c)->mapped)
|
||||||
|
client_set_border_color(c, urgentcolor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (need_arrange){
|
||||||
|
arrange(c->mon,false);
|
||||||
|
}
|
||||||
|
|
||||||
|
printstatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
void configurex11(struct wl_listener *listener, void *data) {
|
void configurex11(struct wl_listener *listener, void *data) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue