Adapted to newest libs
Fixed ALT+TAB problems