wibox.drawable: Redraw when moved

Let's consider the following notification:

  naughty.notify({ text = "foo", bg = "#88888888", timeout=1 })
  naughty.notify({ text = "foo", bg = "#88888888", timeout=2 })

When the first notification disappears, the second one is moved and takes its
place. However, its content was not redrawn. This makes the pseudo-transparency
break and the wallpaper that is shown in the back of the notification doesn't
match the real wallpaper.

Fix this by redrawing drawables when they get moved.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2013-02-20 14:22:41 +01:00
parent 5a2c4fa928
commit 873d41bb5b
1 changed files with 3 additions and 0 deletions

View File

@ -230,6 +230,9 @@ function drawable.new(d, widget_arg)
end
drawables[ret.draw] = true
d:connect_signal("property::surface", ret.draw)
-- We don't need width/height, because this case emits property::surface
d:connect_signal("property::x", ret.draw)
d:connect_signal("property::y", ret.draw)
-- Set the default background
ret:set_bg(beautiful.bg_normal)