* [gentoo-commits] gentoo-x86 commit in x11-wm/awesome/files: awesome-3.5.4-imagebox.patch
@ 2014-04-03 19:16 Maxim Koltsov (maksbotan)
0 siblings, 0 replies; only message in thread
From: Maxim Koltsov (maksbotan) @ 2014-04-03 19:16 UTC (permalink / raw
To: gentoo-commits
maksbotan 14/04/03 19:16:52
Added: awesome-3.5.4-imagebox.patch
Log:
Bump to 3.5.4, add upstream patch for imagebox, bug #506586. Thanks to Bohdan Trach <bv.trach@gmail.com>.
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key F8DBDADE)
Revision Changes Path
1.1 x11-wm/awesome/files/awesome-3.5.4-imagebox.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-wm/awesome/files/awesome-3.5.4-imagebox.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-wm/awesome/files/awesome-3.5.4-imagebox.patch?rev=1.1&content-type=text/plain
Index: awesome-3.5.4-imagebox.patch
===================================================================
From: Uli Schlachter <psychon@znc.in>
Date: Wed, 2 Apr 2014 20:48:06 +0000 (+0200)
Subject: imagebox: Don't try to scale by infinite (FS#1248)
X-Git-Url: http://git.naquadah.org/?p=awesome.git;a=commitdiff_plain;h=7967d05915c95c8eba7709a46093cc1b6de55572;hp=afa50904fb1c79a24ddda8fb242afe2dcc1de841
imagebox: Don't try to scale by infinite (FS#1248)
When an imagebox was drawn with width or height zero, it tried to calculate the
needed scale factor for making the image fit. Sadly, this would be a division by
zero aka infinite in this case.
Fix this by just not drawing anything if there is no space available.
Signed-off-by: Uli Schlachter <psychon@znc.in>
---
diff --git a/lib/wibox/widget/imagebox.lua.in b/lib/wibox/widget/imagebox.lua.in
index da51634..5963d0e 100644
--- a/lib/wibox/widget/imagebox.lua.in
+++ b/lib/wibox/widget/imagebox.lua.in
@@ -18,6 +18,7 @@ local imagebox = { mt = {} }
--- Draw an imagebox with the given cairo context in the given geometry.
function imagebox:draw(wibox, cr, width, height)
if not self._image then return end
+ if width == 0 or height == 0 then return end
cr:save()
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-04-03 19:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-03 19:16 [gentoo-commits] gentoo-x86 commit in x11-wm/awesome/files: awesome-3.5.4-imagebox.patch Maxim Koltsov (maksbotan)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox