awesome/lib
Uli Schlachter 3301e9b0ff naughty.dbus: Duplicate surface data
When an icon is sent over dbus, we turn this into a cairo ImageSurface.
This is done by turning the actual icon data into a string and using
cairo.ImageSurface.create_for_data() to create a surface for this data.
However, this function only creates an ImageSurface that refers to this
data. It does not copy the data. Thus, when the Lua GC later frees the
string, we have a cairo surface that refers to already-freed data.

Fix this by duplicating the cairo surface, which makes cairo create a
copy of the data. Then, we finish the original surface. While doing
this, the string is kept alive in a local variable.

(Possibly) Fixes: https://github.com/awesomeWM/awesome/issues/2361
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-08-19 20:49:03 +02:00
..
awful Merge pull request #2358 from Elv13/add_filter_section 2018-08-19 07:02:06 +00:00
beautiful Grammar correction. 2018-08-14 06:47:41 -05:00
gears timer: Add a reminder to apply the existing naming conventions 2018-08-06 19:03:25 -04:00
menubar program.Terminal is a boolean, not a string (#2239) 2018-04-22 02:06:38 -04:00
naughty naughty.dbus: Duplicate surface data 2018-08-19 20:49:03 +02:00
wibox doc: Add missing C-object documentation and fix some papercuts. 2018-07-25 18:26:11 -04:00
beautiful.lua Add pointless naughty.lua and beautiful.lua files (#1259) 2016-12-08 23:53:50 +01:00
naughty.lua Add pointless naughty.lua and beautiful.lua files (#1259) 2016-12-08 23:53:50 +01:00