Which window manager do you use? And what version of debian?
Off the top of my head, I'm not sure what that could be yet. There is some code for integrating with the menubar at the top of the screen for Unity, but that's something that should happen at startup, and not change on the fly like you're describing.