If you use awesome 3.5, and a gnome or mate panel, the panel will often receive focus when you switch desktops. As a workaround:
{ rule = { class = "Mate-panel" }, properties = { ontop = true, focusable = false } }
/usr/share/awesome/lib/awful/autofocus.lua
with the attached file