### Godot version

 Latest 4.0.dev (a3a42159e31db27f8ae7c1ecad6a9ed417cb05de)

### System information

Ubuntu 22.04.1 LTS

### Issue description

![image](https://user-images.githubusercontent.com/85438892/214476911-0ce83a43-b959-4b13-88fd-d6b9af0cd63a.png)

### Steps to reproduce

Open any script

### Minimal reproduction project

N/A
}
		} else {
			time_since_no_focus = OS::get_singleton()->get_ticks_msec();
		}
	}
	do_mouse_warp = false;
	
	bool mouse_mode_grab = mouse_mode == MOUSE_MODE_CAPTURED || mouse_mode == MOUSE_MODE_CONFINED || mouse_mode == MOUSE_MODE_CONFINED_HIDDEN;
	xi.pressure = 0;
	xi.tilt = Vector2();
	xi.pressure_supported = false;
	LocalVector<XEvent> events;
	{
		
		MutexLock mutex_lock(events_mutex);
		events = polled_events;
		polled_events.clear();
		
		_check_pending_events(events);
	}
	for (uint32_t event_index = 0; event_index < events.size(); ++event_index) {
		XEvent &event = events[event_index];
		if (ignore_events) {
			XFreeEventData(x11_display, &event.xcookie);
			continue;
		}
		bool ime_window_event = false;
		WindowID window_id = MAIN_WINDOW_ID;
		
		for (const KeyValue<WindowID, WindowData> &E : windows) {