I see the problem. You made the icon the child of the window. The window is set to close on any action so all of its children will inherit the 'close on any action' property, too. I cleared the Parent/Owner field as well as the group field, so the icon is unaffected.
I was re-reading your posts to get a better understanding of how you want this to function. I made several modifications and eliminated the complication of using a script. I just used state messages instead.
For the icon object:
-I added a mouse up state.
-The mouse up state has a message to set the window to the animation state
For the window object:
-I created an 'animation' state instead of using the default state.
-The animation state has a message to show the close button
-Also created a 'hide' state (which reverses the animation but you don't have to do that if that's not what you want)
For the close_window object:
-Added a mouse up state
-The mouse up state has messages to hide itself and the window.
So, a single click on the icon will open the window and close_window button. (A double click will open the folder shortcut.) A click on the close button will hide the button itself as well as the window.
DOWNLOAD LINKLet me know if I'm misinterpreting your goal here.
I promise send you the DX theme when it will be ready... (if you want.. of course.. lol)
I'd be honored!