New
#1
Firefox - Using ITaskbarList::ActivateTab
I use a toolbar button to toggle between normal and private windows.
Here is the code:
I use 'setTimeout' in order to prevent some flickering.Code:OpenBrowserWindow({private: !PrivateBrowsingUtils.isWindowPrivate(window)}); setTimeout(BrowserTryToCloseWindow, 80);
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 does have the focus, but it isn't 'checked / active' in Windows Task Bar.
I suppose I need to use ITaskbarList::ActivateTab in order to activate the new window in the task bar.
I have the (very) basic direction:
I'd appreciate your help.Code:Components.utils.import("resource://gre/modules/ctypes.jsm"); var lib = ctypes.open("shell32.dll"); var taskBar = lib.declare(--- taskBar--- lib.close();
Win 7, 32-bit, Classic Theme.
Posted here too.
Last edited by Yaron; 07 Dec 2014 at 20:44.