mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-06-24 13:36:42 -04:00
fix: clip error when cross monitor
This commit is contained in:
parent
95b0724cff
commit
1b2e1cec68
1 changed files with 35 additions and 22 deletions
|
|
@ -13,8 +13,8 @@ struct fx_corner_radii set_client_corner_location(Client *c) {
|
|||
struct fx_corner_radii current_corner_location =
|
||||
corner_radii_all(config.border_radius);
|
||||
|
||||
if (c == grabc ||
|
||||
(!ISTILED(c) && !c->animation.tagining && !c->animation.tagouting)) {
|
||||
if (c == grabc || (!ISSCROLLTILED(c) && !c->animation.tagining &&
|
||||
!c->animation.tagouting)) {
|
||||
return current_corner_location;
|
||||
}
|
||||
|
||||
|
|
@ -376,8 +376,8 @@ void client_draw_shadow(Client *c) {
|
|||
|
||||
int32_t right_offset, bottom_offset, left_offset, top_offset;
|
||||
|
||||
if (c == grabc ||
|
||||
(!ISTILED(c) && !c->animation.tagining && !c->animation.tagouting)) {
|
||||
if (c == grabc || (!ISSCROLLTILED(c) && !c->animation.tagining &&
|
||||
!c->animation.tagouting)) {
|
||||
right_offset = 0;
|
||||
bottom_offset = 0;
|
||||
left_offset = 0;
|
||||
|
|
@ -448,22 +448,27 @@ void client_draw_title(Client *c) {
|
|||
int32_t bottom_over =
|
||||
tab_y + config.group_bar_height - c->mon->m.y - c->mon->m.height;
|
||||
|
||||
if (c != grabc &&
|
||||
(ISSCROLLTILED(c) || c->animation.tagining || c->animation.tagouting)) {
|
||||
if (top_over > 0) {
|
||||
tab_y = c->mon->m.y;
|
||||
th = config.group_bar_height - top_over;
|
||||
}
|
||||
if (bottom_over > 0) {
|
||||
th = th - bottom_over;
|
||||
}
|
||||
if (right_over > 0) {
|
||||
tw = tw - right_over;
|
||||
}
|
||||
if (left_over > 0) {
|
||||
tab_x = c->mon->m.x;
|
||||
tw = tw - left_over;
|
||||
}
|
||||
if (c == grabc || (!ISSCROLLTILED(c) && !c->animation.tagining &&
|
||||
!c->animation.tagouting)) {
|
||||
top_over = 0;
|
||||
bottom_over = 0;
|
||||
left_over = 0;
|
||||
right_over = 0;
|
||||
}
|
||||
|
||||
if (top_over > 0) {
|
||||
tab_y = c->mon->m.y;
|
||||
th = config.group_bar_height - top_over;
|
||||
}
|
||||
if (bottom_over > 0) {
|
||||
th = th - bottom_over;
|
||||
}
|
||||
if (right_over > 0) {
|
||||
tw = tw - right_over;
|
||||
}
|
||||
if (left_over > 0) {
|
||||
tab_x = c->mon->m.x;
|
||||
tw = tw - left_over;
|
||||
}
|
||||
|
||||
if (tw <= 0 || th <= 0) {
|
||||
|
|
@ -498,6 +503,14 @@ void apply_shield(Client *c, struct wlr_box clip_box) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (c == grabc || (!ISSCROLLTILED(c) && !c->animation.tagining &&
|
||||
!c->animation.tagouting)) {
|
||||
clip_box.x = 0;
|
||||
clip_box.y = 0;
|
||||
clip_box.width = c->animation.current.width - 2 * (int32_t)c->bw;
|
||||
clip_box.height = c->animation.current.height - 2 * (int32_t)c->bw;
|
||||
}
|
||||
|
||||
if (active_capture_count > 0 && c->shield_when_capture) {
|
||||
wlr_scene_node_raise_to_top(&c->shield->node);
|
||||
wlr_scene_node_set_position(&c->shield->node, clip_box.x, clip_box.y);
|
||||
|
|
@ -681,8 +694,8 @@ void apply_border(Client *c) {
|
|||
|
||||
int32_t right_offset, bottom_offset, left_offset, top_offset;
|
||||
|
||||
if (c == grabc ||
|
||||
(!ISTILED(c) && !c->animation.tagining && !c->animation.tagouting)) {
|
||||
if (c == grabc || (!ISSCROLLTILED(c) && !c->animation.tagining &&
|
||||
!c->animation.tagouting)) {
|
||||
right_offset = 0;
|
||||
bottom_offset = 0;
|
||||
left_offset = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue