Added visibility state to Widget.
Now only visible widgets handle events.