Window client area expand into window title

I have a very weird problem with one of the projects, after some fooling around
with window (minimize it, restore, click inside the window) mouse over title bar
start to look black as in client area of a normal SDL window and not white as it
should be. And after that I can not minimize or close window by mouse at all.
I can not repeat that problem in more simple application and do not know where
to look to fix this problem. May be someone had it and have some ideas?
Environment: Win2000 and SDL 1.2.11.