### Godot version

Latest 4.0.dev (a3a42159e31db27f8ae7c1ecad6a9ed417cb05de)

### System information

Ubuntu 22.04.1 LTS

### Issue description

Ctrl+Shift+F (Find in Files) in the text editor, for example, causes my laptop to freeze consistently. I also reproduced it with F1 and Ctrl+Shift+R, as well as by using the dropdown instead of shortcuts.

### Steps to reproduce

Trivial

### Minimal reproduction project

N/A
}
				xi.state.clear();
#endif
			} break;
			case ConfigureNotify: {
				DEBUG_LOG_X11("[%u] ConfigureNotify window=%lu (%u), event=%lu, above=%lu, override_redirect=%u \n", frame, event.xconfigure.window, window_id, event.xconfigure.event, event.xconfigure.above, event.xconfigure.override_redirect);
				if (event.xconfigure.window == windows[window_id].x11_xim_window) {
					break;
				}
				const WindowData &wd = windows[window_id];
				XWindowAttributes xwa;
				XSync(x11_display, False);
				XGetWindowAttributes(x11_display, wd.x11_window, &xwa);
				
				
				
				if ((xwa.map_state == IsViewable) && !wd.no_focus && !wd.is_popup) {
					XSetInputFocus(x11_display, wd.x11_window, RevertToPointerRoot, CurrentTime);
				}
				_window_changed(&event);
			} break;
			case ButtonPress:
			case ButtonRelease: {
				if (ime_window_event) {
					break;
				}
				
				last_timestamp = event.xbutton.time;
				if (mouse_mode == MOUSE_MODE_CAPTURED) {
					event.xbutton.x = last_mouse_pos.x;