How to handle mouse events immediately when window changes focused

Godot Version

4.4.1 stable

Question

` I’m on macOs and it might be platform-specific since I saw several open issues on GitHub but basically I want to handle mouse clicks and motions immediately when you click on the window, but right now the first click on the game window only focuses it and the regular input callback is not triggered. My application is an always on-top overlay so doing extra clicks is really inconvenient

I’ve tried to use _process callback and check Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT) after focus state is changed but it doesn’t return true in this scenario. I managed to emulate motion and click automatically on focus change but it doesn’t let me handle drag motion properly because unpressed event is never firing in this case

Is there any alternative solution I can use? `

Looks like with “No focus” option enabled in projects settings it works properly, but it’s only for mouse clicks