Detect if Firefox window is in focus or on another desktop - Mozilla

This is a discussion on Detect if Firefox window is in focus or on another desktop - Mozilla ; I'd like to display an alertService = Components .classes['@mozilla.org/alerts-service;1'] .getService(Components.interfaces.nsIAlertsService ); alertService.showAlertNotification(...); only if Firefox is hidden behind others windows or is located on another virtual desktop. Is there a way to obtain this kind of status infos? Thanks, Ivan...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Detect if Firefox window is in focus or on another desktop

  1. Detect if Firefox window is in focus or on another desktop

    I'd like to display an

    alertService = Components
    .classes['@mozilla.org/alerts-service;1']
    .getService(Components.interfaces.nsIAlertsService );

    alertService.showAlertNotification(...); only if Firefox is hidden
    behind others windows or is located on another virtual desktop.
    Is there a way to obtain this kind of status infos?
    Thanks,
    Ivan

  2. Re: Detect if Firefox window is in focus or on another desktop

    No idea?
    :-/

    Ivan

  3. Re: Detect if Firefox window is in focus or on another desktop

    I solved half problem. When Firefox is on another desktop it acts as
    minimized and

    win.windowState == win.STATE_MINIMIZED

    is true. When Firefox main window is behind another window? Something
    like ".hasFocus"?
    Thanks,
    Ivan

+ Reply to Thread