Fix input and bounding shapes

1) We need to select for shape events
2) For decorated windows, we don't want to apply any input
   shape, because the frame is always rectangular and eats
   all the input
3) For undecorated windows, the "has input shape" check is
   wrong if the window has a bounding shape but not an input
   shape