Active page in wx.lib.agw.aui.AUIManager

Hello,
I am using wx.lib.agw.aui.AUIManager and I want to know which pane is
activated.
For now, I am doing it this way:
for pane in self._auim.GetAllPanes():
       if pane.state & aui.AuiPaneInfo.optionActive:
                return pane.window
       return None
(self._auim being my AUIManager)
It works pretty well but when I am undocking a pane, it looses the
activated state (another docked pane gets it...)
I am doing things the right well ? Is it normal that a floating pane
can't be activated ?
Thanks
Laurent