r/programminghumor • • Oct 08 '26

Closing a window on Windows

Enable HLS to view with audio, or disable this notification

All window windows on Windows should close like this, windows are made out of glass

45 Upvotes

19 comments sorted by

7

u/Jonrrrs Oct 08 '26

Where is this animation from?

3

u/Shaiiwaru Oct 08 '26

Wdym exactly?

3

u/Fugach Oct 08 '26

Which software is used for window breaking animation?

4

u/Shaiiwaru Oct 08 '26

C++ and Qt, is not any software

2

u/unix_user01 Oct 08 '26

Wait, I did not know qt ran on windows. Would love to see your code.

4

u/OkScallion2496 Oct 09 '26

Why are you getting downvoted? I mean you just asked, you did not demand to get the code.

The worst that can happen is them saying it's not open source.

1

u/Shaiiwaru Oct 08 '26

What? I did not know qt ran on other systems than Windows neither

code for this is quite long, 3 different files to each improvement (window anim, sound, and AnimEngine), and a ghost window where it can animate

I tried intercepting the rendering loop but it was painful so I dropped that idea, instead I capture the window in a bitmap and layers a popup with it above the main window, then the real window releases the exit state and closes the main window (I have a manual block of 300ms)

took advantage of my personalized D3D11 generic drivers that my app uses to achieve this ofc

5

u/FaultWinter3377 Oct 08 '26

About half the Linux GUI world is built on Qt... in fact I tend to think of Qt as more of a KDE/Linux think than Windows in general lol...

3

u/Shaiiwaru Oct 08 '26

Makes sense, Qt covers a lot on interfaces but hell no I’m not using it for that

3

u/socal_nerdtastic Oct 08 '26

The majority of GUI modules are cross platform. The few that are single OS are the minority.

0

u/Shaiiwaru Oct 08 '26

i'm not sure if I should give anyone any of my code, I never seen someone ever do this

2

u/NoPicture-3265 Oct 09 '26

Never heard of open-source software?

1

u/Shaiiwaru Oct 10 '26

My stuff, my code bud

1

u/unix_user01 Oct 10 '26

You have every right say no. Just remember if the qt team had said, my stuff my code, you would not have what you have. Just something to think about.

I wish you the best in your endeavors.

→ More replies

2

u/socal_nerdtastic Oct 08 '26

Man that brings back memories, I had that animation on my desktop cube 20 years ago. Are you making compiz for windows?

3

u/Shaiiwaru Oct 08 '26

Nope, it’s just for my app as internal joke