mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-07-10 11:04:10 -04:00
opt: optimize focus lift logic
This commit is contained in:
parent
380ced0452
commit
c58e96db6e
3 changed files with 5 additions and 7 deletions
|
|
@ -680,7 +680,7 @@ int32_t restore_minimized(const Arg *arg) {
|
|||
show_hide_client(c);
|
||||
setborder_color(c);
|
||||
arrange(c->mon, false, false);
|
||||
focusclient(c, 0);
|
||||
focusclient(c, 1);
|
||||
warp_cursor(c);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -608,8 +608,6 @@ monocle(Monitor *m) {
|
|||
geom.height = m->w.height - 2 * cur_gappov;
|
||||
client_tile_resize(c, geom, 0);
|
||||
}
|
||||
if ((c = focustop(m)))
|
||||
wlr_scene_node_raise_to_top(&c->scene->node);
|
||||
}
|
||||
|
||||
// 网格布局窗口大小和位置计算
|
||||
|
|
|
|||
|
|
@ -1439,7 +1439,7 @@ bool switch_scratchpad_client_state(Client *c) {
|
|||
c->tags = get_tags_first_tag(selmon->tagset[selmon->seltags]);
|
||||
resize(c, c->float_geom, 0);
|
||||
arrange(selmon, false, false);
|
||||
focusclient(c, true);
|
||||
focusclient(c, 1);
|
||||
c->scratchpad_switching_mon = false;
|
||||
return true;
|
||||
} else {
|
||||
|
|
@ -1452,7 +1452,7 @@ bool switch_scratchpad_client_state(Client *c) {
|
|||
(c->mon->tagset[c->mon->seltags] & c->tags) == 0) {
|
||||
c->tags = c->mon->tagset[c->mon->seltags];
|
||||
arrange(c->mon, false, false);
|
||||
focusclient(c, true);
|
||||
focusclient(c, 1);
|
||||
return true;
|
||||
} else if (c->is_in_scratchpad && c->is_scratchpad_show &&
|
||||
(c->mon->tagset[c->mon->seltags] & c->tags) != 0) {
|
||||
|
|
@ -3876,7 +3876,7 @@ void destroylock(SessionLock *lock, int32_t unlock) {
|
|||
wlr_scene_node_set_enabled(&locked_bg->node, false);
|
||||
}
|
||||
|
||||
focusclient(focustop(selmon), 0);
|
||||
focusclient(focustop(selmon), 1);
|
||||
motionnotify(0, NULL, 0, 0, 0, 0);
|
||||
|
||||
destroy:
|
||||
|
|
@ -6869,7 +6869,7 @@ void unmapnotify(struct wl_listener *listener, void *data) {
|
|||
}
|
||||
|
||||
if (nextfocus) {
|
||||
focusclient(nextfocus, 0);
|
||||
focusclient(nextfocus, 1);
|
||||
}
|
||||
|
||||
if (!nextfocus && selmon->isoverview) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue