Add window activation events for OS X plugins, patch from Markus Stange.