Move aspect_ratio from Con to Window.

relates to #665
This commit is contained in:
Ingo Bürk
2015-08-30 23:07:25 +02:00
parent f43a15acde
commit 344514bca5
5 changed files with 13 additions and 12 deletions

View File

@ -172,14 +172,14 @@ void render_con(Con *con, bool render_fullscreen) {
* Ignoring aspect ratio during fullscreen was necessary to fix MPlayer
* subtitle rendering, see http://bugs.i3wm.org/594 */
if (!render_fullscreen &&
con->aspect_ratio > 0.0) {
con->window->aspect_ratio > 0.0) {
DLOG("aspect_ratio = %f, current width/height are %d/%d\n",
con->aspect_ratio, inset->width, inset->height);
con->window->aspect_ratio, inset->width, inset->height);
double new_height = inset->height + 1;
int new_width = inset->width;
while (new_height > inset->height) {
new_height = (1.0 / con->aspect_ratio) * new_width;
new_height = (1.0 / con->window->aspect_ratio) * new_width;
if (new_height > inset->height)
new_width--;