Added layer correction for focused windows.