Skip to content

Commit

Permalink
grid: fix left or right tiled windows rendering oversize and over edges
Browse files Browse the repository at this point in the history
The left and right tiled cases were supported by Mutter and special-cased by GTK3
  • Loading branch information
lukefromdc committed Feb 26, 2018
1 parent f51d181 commit e3034b7
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions src/grid/grid.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,11 +342,22 @@ gridCommonWindow (CompWindow *cw,
constrainSize (cw, &gs->desiredSlot, &gs->desiredRect);
DEBUG_RECT (gs->desiredRect);
}

xwc.x = gs->desiredRect.x - cw->clientFrame.left;
xwc.y = gs->desiredRect.y - cw->clientFrame.top;
xwc.width = gs->desiredRect.width + cw->clientFrame.left + cw->clientFrame.right;
xwc.height = gs->desiredRect.height + cw->clientFrame.top + cw->clientFrame.bottom;
/*tiled left or right: this worked without any changes here */
/*These are a special case with CSD apps due to GTK behavior */
if (where == GridLeft || where == GridRight){
xwc.x = gs->desiredRect.x;
xwc.y = gs->desiredRect.y;
xwc.width = gs->desiredRect.width;
xwc.height = gs->desiredRect.height;
}
/*Quarter-tiled, top-tiled, or bottom tiled */
/*FIXME: in the top and bottom tiled cases width set here is NOT applied */
else{
xwc.x = gs->desiredRect.x - cw->clientFrame.left;
xwc.y = gs->desiredRect.y - cw->clientFrame.top;
xwc.width = gs->desiredRect.width + cw->clientFrame.left + cw->clientFrame.right;
xwc.height = gs->desiredRect.height + cw->clientFrame.top + cw->clientFrame.bottom;
}

if (cw->mapNum)
sendSyncRequest (cw);
Expand Down

0 comments on commit e3034b7

Please sign in to comment.