2

The official documentation states that when no Chrome windows have focus, I should get an event with a windowId of WINDOW_ID_NONE(-1). However, I can not cause this to happen in my setup, using Ubuntu 14.04 with the default Unity DWM.

In my attached screenshot: 2

, I have two Chrome windows open across two monitors, one is a normal session, the other is a inspected view of my extension's background page. I have the Trash window of my file browser clicked on and in focus, yet I didn't get the expected onFocusChangedEvent.

chrome.windows.onFocusChanged.addListener(function(window){
    if(window == chrome.windows.WINDOW_ID_NONE){
        console.log("not in focus!");
    }else{
        console.log("in focus!");
    }
});

Is this a bug or am I misunderstanding something?

user3806049
  • 290
  • 2
  • 9

0 Answers0