<div dir="rtl"><div dir="ltr">Hello,<br><br></div><div dir="ltr">I've posted the following question in various forums, but never received a good answer. <br></div><div dir="ltr">If you are familiar with the issue, I would truly be grateful for your help.<br><br>***<br>I use a toolbar button to toggle between normal and private windows.<br>Here is the code:<br><br>OpenBrowserWindow({private: !PrivateBrowsingUtils.isWindowPrivate(window)});<code><br>setTimeout(BrowserTryToCloseWindow, 80);<br><br></code><br>I use 'setTimeout' in order to prevent some flickering.<br><br>When the new window opens, it gets the focus.<br>When the command 'BrowserTryToCloseWindow' is executed, the focus returns to the old window.<br>When the old window is closed, the new one <b>does have the focus</b>, but it isn't 'checked / active' in Windows Task Bar.<br><br>I suppose I need to use <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/bb774644%28v=vs.85%29.aspx" target="_blank" class="">ITaskbarList::ActivateTab</a> in order to activate the new window in the task bar.<br>I have the (very) basic direction:<br><br>Components.utils.import("resource://gre/modules/ctypes.jsm");<br>var lib = ctypes.open("shell32.dll");<br>var taskBar = lib.declare(---<br>taskBar---<code><br>lib.close();<br><br>*<br></code><br>Win 7, 32-bit, <b>Classic Theme</b>.<br><br>***<br></div><div dir="ltr">Best regards,<br></div><div dir="ltr">Michael<br></div></div>