The precise alignment of P waves in the surface ECG is crucial for analyzing beat-to-beat atrial depolarization, but remains challenging due to their low amplitude, slow dynamics, and unclear boundaries. Traditional cross-correlation (CC) methods may not reliably reflect true similarity, particularly in poor-quality signals. We investigated a morphology-based alignment approach called Two-Window Minimization (TWM), and compared it with standard CC alignment in terms of performance. We introduced two new TWM versions using segment integration based on trapezoidal and integral elements and systematically varied the window size and position. The method was tested on surface ECGs from 47 pediatric patients in sinus rhythm, using intracardiac electrograms as ground truth. Accuracy was assessed by comparing the ECG-based alignment with the actual timing of atrial activation in coronary sinus electrograms. The basic TWM metric was shown to be the least time-consuming with a runtime of 1.03 seconds per dataset. The integral-based TWM variant achieved the lowest mean alignment error (0.06 ms). The trapezoidal-based TWM exhibited the least variability, with a standard deviation of 3.08 ms. CC performed well only at large window size (-0.15 ±3.55 ms), but degraded with reduced data. Overall, the trapezoidal TWM method offered the best trade-off between precision, robustness, and speed. It appears to be well suited for real-time or embedded applications.