Skip to content

Commit

Permalink
Fix fullscreen remainder calculation
Browse files Browse the repository at this point in the history
Previously would not handle right half with right sided panel.
  • Loading branch information
darkstego committed Oct 6, 2021
1 parent 71e9a2f commit bb8d26f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions contents/code/mudeer.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,15 @@ function fullscreen(workspace, side, remainder) {
if (remainder) {
geometry.y=maxArea.y
geometry.height=maxArea.height
geometry.x=maxArea.x
geometry.width-=fullArea.width-maxArea.width
if (geometry.x < maxArea.x) {
var diff = maxArea.x - geometry.x
geometry.x=maxArea.x
geometry.width-=diff
}
else if ((geometry.x + geometry.width) > (maxArea.x + maxArea.width)) {
var diff= (geometry.x + geometry.width) - (maxArea.x + maxArea.width)
geometry.width-=diff
}
}
client.geometry=geometry
}
Expand Down

0 comments on commit bb8d26f

Please sign in to comment.