Work done by Sam Spilsbury: - Ensure that the frame region is always set as soon as the window is decorated. - Further ensure that the window decoration isn't needlessly reset if the window already had one. - Refactored XShape usage into a common function. - Added tests to verify the behaviour of shape set on initially creating a decorated window and also upon changing the input frame window shape. Fixes: https://bugs.launchpad.net/bugs/1158267.