Window deactivate event not firing

Hi,

While trying to implement a simple taskbar into my application I noticed that deactivate event doesn't fire.
I create two windows and when I click on one of them it will fire activate event but the other one won't fire deactivate event.
Is this a bug or am I missing something?

See where you use deactivate, but not blur. Are you focusing anything in the window?
Hard to tell since you only provided a snippet. Does my example work and can you provide a working test case of you setup?

I have just tried and, unfortunately, doesn't work.
Still just fires focus.
I did manage to get what I want by adding for() to deactivate buttons for all other windows besides the one receiving the focus.

I've just noticed this problem as well while converting our app from v3.4 to v4.1.3. We are using Ext.WindowManager to manage windows in a desktop-like application. Previously (in v3.4), when a new window was added with its manager set, then its 'toFront' method (called from within its show method) would call the bringToFront method of the manager:

Ultimately, the WindowManager's setActiveWin method gets triggered, which calls setActive(false) on the current 'front' window, which results in the deactivate event being fired. It then sets the 'front' window to the passed window and calls its setActive(true), which fires the activate event.

In ExtJS v4, Ext.WindowManager is different - it is just an instance of the new ZIndexManager, which doesn't include all the same methods as the old WindowManager (it has more generic use managing z-indexes in components including combo-boxes etc, but now lacks specific logic for managing windows).

I'd argue that it's a bug that the behaviour is not the same as in v3.4 - specifically that there is no actual WindowManager class that is specifically designed to manage multiple windows, including triggering the activate/deactivate events as per the equivalent in v3.4).

I'm looking at figuring out a manual workaround to get the deactivate event to fire - I'll update this thread if/when I figure that out.