Better check for on screen visibility

The check for visible drawables didn't account for compositing
which can place a window off-screen. Put all of these checks in
a common place and make sure it detects things properly.
1 file changed