awful: button handle enter if mouse button pushed

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-08-25 17:20:40 +02:00
parent 8b5fe6f30f
commit ba20d32d10
1 changed files with 1 additions and 0 deletions

View File

@ -1601,6 +1601,7 @@ function widget.button(args)
w.text = img_release
w:buttons({ capi.button({}, 1, function () w.text = img_press end, function () w.text = img_release end) })
function w.mouse_leave(s) w.text = img_release end
function w.mouse_enter(s) if capi.mouse.coords().buttons[1] then w.text = img_press end end
return w
end