Fixed an error involving XRandR.

The old version was reading the *maximum* size, not the *current* size,
which requires some more work to get at.
Added a method to get the class of a window.

This will be useful for coding window actions.