The Shaped Clock example shows how to apply a widget mask to a top-level widget to produce a shaped window.