fix: cransh in disable monitor when use scratchpad

This commit is contained in:
DreamMaoMao 2026-05-19 13:59:38 +08:00
parent adeaaada45
commit 9e4fade55e
3 changed files with 10 additions and 2 deletions

View file

@ -1,5 +1,12 @@
bool check_hit_no_border(Client *c) {
bool hit_no_border = false;
if (!c->mon)
return false;
if (c->tags <= 0)
return false;
if (!render_border) {
hit_no_border = true;
}

View file

@ -54,7 +54,7 @@ uint32_t get_tags_first_tag_num(uint32_t source_tags) {
tag = 0;
if (!source_tags) {
return selmon->pertag->curtag;
return 0;
}
for (i = 0; !(tag & 1) && source_tags != 0 && i < LENGTH(tags); i++) {

View file

@ -6389,7 +6389,8 @@ void updatemons(struct wl_listener *listener, void *data) {
c->geom.x += mon_pos_offsetx;
c->geom.y += mon_pos_offsety;
c->float_geom = c->geom;
resize(c, c->geom, 1);
if (VISIBLEON(c, m))
resize(c, c->geom, 1);
}
// restore window to old monitor