How to reliably give window focus?

I need to set Chrome focus to all other running applications. Javascript window.focus () only focuses on other windows of the same browser.

When the Chrome extension runs:

chrome.windows.update(theWindowId, {focused: true}); 

I experience different behavior on Mac compared to Windows 7:

  • On Mac intended window focuses on all other running applications.
  • In Windows 7 intended window focuses only on other Chrome windows, but not on top of other running applications.

Does anyone know how to reliably configure the target window for all applications in Windows?

+4
source share
1 answer

Unfortunately, the chrome.windows.update() API is still very unreliable in how it handles the cross-focus window focus platform. I even noticed inconsistencies at different times on the same platform. Many of them are associated with various security policies that different OSs use to manage windows, so really little can be done in terms of how it functions for an end user who may or may not have been able to apply the appropriate registry hack.

0
source

All Articles