From: Michael Stapelberg Date: Sat, 21 Jan 2012 13:29:06 +0000 (+0000) Subject: Ignore aspect ratio during fullscreen mode (fixes MPlayer subtitles) (Thanks mxf... X-Git-Tag: 4.2~128 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6ffc0f94cb6a574a8846614c2aab41ea9372a6bb;p=i3%2Fi3 Ignore aspect ratio during fullscreen mode (fixes MPlayer subtitles) (Thanks mxf, alexander) Fixes: #594 --- diff --git a/src/render.c b/src/render.c index b55c089a..860219df 100644 --- a/src/render.c +++ b/src/render.c @@ -143,8 +143,17 @@ void render_con(Con *con, bool render_fullscreen) { inset->width -= (2 * con->border_width); inset->height -= (2 * con->border_width); - /* Obey the aspect ratio, if any */ - if (con->proportional_height != 0 && + /* Obey the aspect ratio, if any, unless we are in fullscreen mode. + * + * The spec isn’t explicit on whether the aspect ratio hints should be + * respected during fullscreen mode. Other WMs such as Openbox don’t do + * that, and this post suggests that this is the correct way to do it: + * http://mail.gnome.org/archives/wm-spec-list/2003-May/msg00007.html + * + * Ignoring aspect ratio during fullscreen was necessary to fix MPlayer + * subtitle rendering, see http://bugs.i3wm.org/594 */ + if (!render_fullscreen && + con->proportional_height != 0 && con->proportional_width != 0) { double new_height = inset->height + 1; int new_width = inset->width;