Broken implementation of grab focus improvement (to be migrated to linux because Windoze debugging is a joke)