I hope you weren't being patronizing, and it is a bug. First of all, the "snap when near" feature (which is nice, let me make that clear) is obviously getting it slightly wrong, since the windows should snap together, not overlap.
As for the currently selected bit, thanks, you just helped me expose what looks like another bug. Try the following - take the Colors window and make it partially overlap the Tools window. Remember, the Colors window has the focus. Now move your mouse over to the Tools window. What happens? Yeah, the Tools window automagically receives focus on mouseover and is now partially overlapping the Colors window. Why? The Colors window had focus, didn't it? Also, now move the mouse back to the Colors window. By rights if that previous autofocus bit was really a "feature", now the Colors window should be on top now, but it isn't. It stays below the Tools window. So the Tools window can effectively "jump on top of the pile" on a mere mouseover, but to get the Colors window back on top requires an explicit click. The exact same thing happens between the History and Layers windows too, with the former always taking precedence over the latter, and the former having the autofocus feature while the latter doesn't.
It would be nice if both these issues were corrected for the next release. For the record I like the autofocus bit, but it should work equally for all the floating windows, not just a few.
Also, since this is more of a bug report now, should I repost in the "Troubleshooting & Bug Reports" section or will someone move this there? (Seems we can't delete our own threads here.)