clicking on a task in the tasklist now show/hide the window.

added the ability to show/hide a window when clicking on the tasklist:
- when we click on a non current task, it only select (and unhide it).
- when we click on the already current task, it hide it.

What does the line above do? I understand the lines below from the patch commit message, but I'm having trouble understanding why this is needed.