Fixed window snapping.

The wrong values were being used in the switch expression (the key names
were used, when the correct values are the members of the SnapDir enum).