Perhaps using something like this... https://github.com/rschmitt/heatseeker/blob/master/src/screen/windows.rs