Skip to content

Commit

Permalink
EWMH area: don't crop the boundary
Browse files Browse the repository at this point in the history
When getting the working EWMH area, don't crop the boundary to the
screen edge.
  • Loading branch information
ThomasAdam committed Oct 3, 2020
1 parent 98cd754 commit 90f7b45
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions fvwm/ewmh.c
Expand Up @@ -979,8 +979,8 @@ void ewmh_ComputeAndSetWorkArea(struct monitor *m)
bottom = max(bottom, fw->strut.bottom);
}

w = m->si->x + m->si->w;
h = m->si->y + m->si->h;
w = m->si->x > 0 ? m->si->x : 0 + m->si->w;
h = m->si->y > 0 ? m->si->y : 0 + m->si->y + m->si->h;

x = left;
y = top;
Expand Down Expand Up @@ -1038,8 +1038,8 @@ void ewmh_HandleDynamicWorkArea(struct monitor *m)
dyn_bottom = max(dyn_bottom, fw->dyn_strut.bottom);
}

w = m->si->x + m->si->w;
h = m->si->y + m->si->h;
w = m->si->x > 0 ? m->si->x : 0 + m->si->w;
h = m->si->y > 0 ? m->si->y : 0 + m->si->y + m->si->h;
x = dyn_left;
y = dyn_top;
width = w - (dyn_left + dyn_right);
Expand Down Expand Up @@ -1109,8 +1109,8 @@ void EWMH_GetWorkAreaIntersection(
}
nx = max(*x, area_x);
ny = max(*y, area_y);
nw = min(*x + *w, area_x + area_w) - nx;
nh = min(*y + *h, area_y + area_h) - ny;
nw = min(*x + *w, area_x + area_w);
nh = min(*y + *h, area_y + area_h);

*x = nx;
*y = ny;
Expand Down

0 comments on commit 90f7b45

Please sign in to comment.