Set Z-index of OS game window

Godot Version

4.3

Question

Hello! I’m wondering if I can set the z-index of the the actual game window. I want to send the game window to behind all other windows so it is just above the desktop.

I been trying to find out how to do this but haven found anything yet so any help would be appreciated! :grinning:

Curious if you have a use case. Also which OS are you referring. I don’t think this can be done within godot unless there is a way to access the OS.

There is a way to minimize it on startup using the command below

DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_MINIMIZED)

Thanks for your reply

My use is having a window sit lowest on the desktop so it looks like its part of the wallpaper. Kind of like the desktop gadgets in windows 7.

The main OS I want it to work on is Windows. I’ve had a look at the code for the windows display server and don’t think their is any simple way to do it. So I’ll try to get it working by using C# and the Windows SetWindowPos function SetWindowPos function (winuser.h) - Win32 apps | Microsoft Learn

If anyone has any ideas I would appreciate it but I’ll see if I get it to work in C#.