Received: from list by lists.gnu.org with archive (Exim 4.71) id 1UzVxT-0004Ew-0L for mharc-grub-devel@gnu.org; Wed, 17 Jul 2013 13:56:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40009) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzVxO-0004EY-BM for grub-devel@gnu.org; Wed, 17 Jul 2013 13:56:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UzVxL-0006Um-VZ for grub-devel@gnu.org; Wed, 17 Jul 2013 13:56:06 -0400 Received: from collab.rosalab.ru ([195.19.76.181]:39303) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzVxL-0006U2-Iy for grub-devel@gnu.org; Wed, 17 Jul 2013 13:56:03 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by collab.rosalab.ru (Postfix) with ESMTP id 410BB29C230 for ; Wed, 17 Jul 2013 21:56:00 +0400 (MSK) X-Virus-Scanned: amavisd-new at rosalab.ru Received: from collab.rosalab.ru ([127.0.0.1]) by localhost (collab.rosalab.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yeVJ1O7vS7h7 for ; Wed, 17 Jul 2013 21:55:59 +0400 (MSK) Received: from icedphoenix.localnet (unknown [217.199.216.178]) by collab.rosalab.ru (Postfix) with ESMTPSA id 5792729C22F for ; Wed, 17 Jul 2013 21:55:59 +0400 (MSK) From: Vladimir Testov To: grub-devel@gnu.org Subject: [PATCH] grub-core/gfxmenu/widget-box.c - bugfix: incorrect drawing in cases of NULL center slice Date: Wed, 17 Jul 2013 21:55:58 +0400 Message-ID: <3516310.x8V9U5xGG7@icedphoenix> User-Agent: KMail/4.10.4 (Linux/3.8.0-26-generic; KDE/4.10.4; x86_64; ; ) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart2059041.cMaIiIVC1n" Content-Transfer-Encoding: 7Bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 195.19.76.181 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jul 2013 17:56:09 -0000 This is a multi-part message in MIME format. --nextPart2059041.cMaIiIVC1n Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" See screenshots included. If the center slice is NULL then west or north slice is also NULL so the height_n or width_w is also NULL. We can count these values from raw (non- scaled) bitmaps. The values will be the same as before for common cases. And the bug will be fixed. -- With best regards, _______________________________ Vladimir Testov, ROSA Laboratory. www.rosalab.ru --nextPart2059041.cMaIiIVC1n Content-Disposition: attachment; filename="after-widget-box.png" Content-Transfer-Encoding: base64 Content-Type: image/png; name="after-widget-box.png" iVBORw0KGgoAAAANSUhEUgAAAB8AAAAUCAYAAAB1aeb6AAAABmJLR0QA/wD/AP+gvaeTAAAACXBI WXMAAA7EAAAOxAGVKw4bAAAAB3RJTUUH3QcRETME1hMh1QAAALFJREFUSMftlcENwjAMRb8RI4Da hZijW7BDD+xgZ5EyBB0iVTlyRObEpUqr1g6thPqlXHx5/vF3QteqUgwkIsitS6J2wIba4ZvomCre 2xZ9jNkggRmvEOY5f3YdzmUJInKfIAJJgCevvY8Rp6JwORZmsAjUMnNPA1+wK3CWBuaARwM31K2u R+eWkqra025xYVo1XQn8XjLzXzqehK8BBgB6NI16QpP9eQUAItp/tf+EfwC2C0fzprDf2wAAAABJ RU5ErkJggg== --nextPart2059041.cMaIiIVC1n Content-Disposition: attachment; filename="grub-widget-box-fix.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="grub-widget-box-fix.patch" diff -Naur grub-2.01/grub-core/gfxmenu/widget-box.c grub-box-draw/grub-core/gfxmenu/widget-box.c --- grub-2.01/grub-core/gfxmenu/widget-box.c 2013-02-25 16:54:27.000000000 +0400 +++ grub-box-draw/grub-core/gfxmenu/widget-box.c 2013-07-17 21:25:10.536077964 +0400 @@ -81,8 +81,8 @@ int height_n; int width_w; - height_n = get_height (self->scaled_pixmaps[BOX_PIXMAP_N]); - width_w = get_width (self->scaled_pixmaps[BOX_PIXMAP_W]); + height_n = get_height (self->raw_pixmaps[BOX_PIXMAP_N]); + width_w = get_width (self->raw_pixmaps[BOX_PIXMAP_W]); /* Draw sides. */ blit (self, BOX_PIXMAP_N, x + width_w, y); --nextPart2059041.cMaIiIVC1n Content-Disposition: attachment; filename="before-widget-box.png" Content-Transfer-Encoding: base64 Content-Type: image/png; name="before-widget-box.png" iVBORw0KGgoAAAANSUhEUgAAAB8AAAAUCAYAAAB1aeb6AAAABmJLR0QA/wD/AP+gvaeTAAAACXBI WXMAAA7EAAAOxAGVKw4bAAAAB3RJTUUH3QcRETcbP3fpJAAAAMFJREFUSMftlcENwjAMRb9Rj2mZ ijm6BfPYkZiAAXrnRKUu0BWgPYK5cIAoQNKkqoT6pVx88LfzXxTa17XCkYggt3ae2gYLajVfRIWv eOp7VMa81bq2DWoozDhaC5fie9DmRNiWJa7jCCKKOlYEYm36tVfG4DIMwY2EGRz5RL9mHjrAFOMg 4H4NMNXYD5wqzg5cwozDhyxVNS/tvs2KOZ6azpClPs+rbjGZp2SpKcClGMeIuqbR3CAlA0dE66/2 n+YPtktQWBF1itMAAAAASUVORK5CYII= --nextPart2059041.cMaIiIVC1n--