public void setWindowMask(final Window w, final Raster raster) {
whenDisplayable(w, new Runnable() {
public void run() {
GDI32 gdi = GDI32.INSTANCE;
User32 user = User32.INSTANCE;
HWND hWnd = getHWnd(w);
final HRGN result = gdi.CreateRectRgn(0, 0, 0, 0);
try {
if (raster == null) {
gdi.SetRectRgn(result, 0, 0, w.getWidth(), w.getHeight());
}