Merge pull request #655 from tryone144/frame-extents-fixed

Fix incorrect frame region in new backends
This commit is contained in:
yshui
2021-07-10 14:06:00 +01:00
committed by GitHub
2 changed files with 6 additions and 5 deletions

View File

@@ -506,7 +506,7 @@ static inline void ev_property_notify(session_t *ps, xcb_property_notify_event_t
}
// If frame extents property changes
if (ps->o.frame_opacity > 0 && ev->atom == ps->atoms->a_NET_FRAME_EXTENTS) {
if (ev->atom == ps->atoms->a_NET_FRAME_EXTENTS) {
auto w = find_toplevel(ps, ev->window);
if (w) {
win_set_property_stale(w, ev->atom);

View File

@@ -231,8 +231,8 @@ void win_get_region_noframe_local(const struct managed_win *w, region_t *res) {
int x = extents.left;
int y = extents.top;
int width = max2(w->g.width - (extents.left + extents.right), 0);
int height = max2(w->g.height - (extents.top + extents.bottom), 0);
int width = max2(w->widthb - (extents.left + extents.right), 0);
int height = max2(w->heightb - (extents.top + extents.bottom), 0);
pixman_region32_fini(res);
if (width > 0 && height > 0) {
@@ -246,8 +246,9 @@ gen_without_corners(win_get_region_noframe_local);
void win_get_region_frame_local(const struct managed_win *w, region_t *res) {
const margin_t extents = win_calc_frame_extents(w);
auto outer_width = extents.left + extents.right + w->g.width;
auto outer_height = extents.top + extents.bottom + w->g.height;
auto outer_width = w->widthb;
auto outer_height = w->heightb;
pixman_region32_fini(res);
pixman_region32_init_rects(
res,