# Firefox - Set 'Checked' state in the Task Bar



## Yaron2011 (Jan 22, 2012)

I use a toolbar button to toggle between normal and private windows.
Here is the code:

```
OpenBrowserWindow({private: !PrivateBrowsingUtils.isWindowPrivate(window)});

setTimeout(BrowserTryToCloseWindow, 80);
```
I use 'setTimeout' in order to prevent some flickering.

When the new window opens, it gets the focus.
When the command 'BrowserTryToCloseWindow' is executed, the focus returns to the old window.
When the old window is closed, the new one turns 'active' but it isn't 'checked' in Windows Task Bar.

How can I fix that?
Can I send 'Activate' (or anything similar) directly to the 'Firefox taskbar item'?

CheckedAndNotChecked, Win 7, Classic Theme.

Thank you.


----------

