How to detect borders/frames of windows other than the game's?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By FrostyBasil

I wish to detect windows of other applications on the screen and have a sprite interact with it, for example, jump on the top side of a window, and stay on it even if the window gets dragged around by the user.
I tried searching on Google using phrases such as “Godot how to detect other windows on screen” etc, but I only found answers concerning the game window itself, not other application windows.
Also, if there is a way to accomplish this, would the solution vary depending on platforms (PC ones, specifically)?
Any help is appreciated!

i’m not 100% sure, but i dont think godot has any built-in feature to interact with windows explorer, being a game engine it is focused on grabbing input from inside the game and from the OS (mouse, keyboard), not from third part application.

you probably can do it, but it requires some advance knowledge on the source code

Andrea | 2021-03-15 12:56

Indeed, Godot doesn’t have functionality to detect whether over windows are overlapping it. To implement this, you’ll need to write a C++ module.

Calinou | 2021-03-15 13:25

That makes sense. Thank you both, I’ll study up more and try to code it separately then.

FrostyBasil | 2021-03-15 20:06