wibox.layout.base.rect_to_device_geometry: Fix for "weird" rotations
commit983d094c76c5ddb6fe7deeec2f977a981c057a8a
authorUli Schlachter <psychon@znc.in>
Sun, 5 Oct 2014 08:47:39 +0000 (5 10:47 +0200)
committerUli Schlachter <psychon@znc.in>
Sun, 5 Oct 2014 08:47:39 +0000 (5 10:47 +0200)
treedf9fb3930d2f2d1d9557ed99a75c3f3cd0a130dc
parent57b6433b5317bb746a61a6aa84d6b66d506a5245
wibox.layout.base.rect_to_device_geometry: Fix for "weird" rotations

The old code transformed the top-left and bottom-right corner of the rectangle
to device space and calculated a rectangle based on these two points. However,
if you rotate a rectangle by 45°, these two points will be directly above each
other and thus the old code would calculate a width of 0.

Fix this by transforming all four corners of the rectangle into device space and
calculating a rectangle based on this.

Signed-off-by: Uli Schlachter <psychon@znc.in>
lib/wibox/layout/base.lua.in