mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-31 22:25:29 -04:00
fix:getting stuck in an infinite loop when attempting to activate a client in tag 0
This commit is contained in:
parent
32cf3c120c
commit
ede1f880b9
1 changed files with 13 additions and 0 deletions
13
src/maomao.c
13
src/maomao.c
|
|
@ -1383,6 +1383,9 @@ swallow(Client *c, Client *w)
|
|||
c->isurgent = w->isurgent;
|
||||
c->isfullscreen = w->isfullscreen;
|
||||
c->ismaxmizescreen = w->ismaxmizescreen;
|
||||
c->isminied = w->isminied;
|
||||
c->is_in_scratchpad = w->is_in_scratchpad;
|
||||
c->is_scratchpad_show = w->is_scratchpad_show;
|
||||
c->tags = w->tags;
|
||||
c->geom = w->geom;
|
||||
c->scroller_proportion = w->scroller_proportion;
|
||||
|
|
@ -1398,6 +1401,11 @@ swallow(Client *c, Client *w)
|
|||
if(!c->foreign_toplevel && c->mon)
|
||||
add_foreign_toplevel(c);
|
||||
|
||||
if(c->isminied) {
|
||||
wlr_foreign_toplevel_handle_v1_set_activated(c->foreign_toplevel, false);
|
||||
wlr_foreign_toplevel_handle_v1_set_minimized(c->foreign_toplevel, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void toggle_scratchpad(const Arg *arg) {
|
||||
|
|
@ -5314,6 +5322,11 @@ setsel(struct wl_listener *listener, void *data)
|
|||
unsigned int get_tags_first_tag(unsigned int source_tags) {
|
||||
unsigned int i, target, tag;
|
||||
tag = 0;
|
||||
|
||||
if(!source_tags) {
|
||||
return selmon->pertag->curtag;
|
||||
}
|
||||
|
||||
for (i = 0; !(tag & 1); i++) {
|
||||
tag = source_tags >> i;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue