Implemented a master window in stack modes.