Add GetWindows helper that returns a vector

This commit is contained in:
Kevin Sawicki 2017-04-06 14:43:37 -07:00
parent 0883a9f966
commit da5d7d72b0
5 changed files with 11 additions and 21 deletions

View file

@ -16,9 +16,7 @@ namespace atom {
void Browser::Focus() {
// Focus on the first visible window.
WindowList* list = WindowList::GetInstance();
for (WindowList::iterator iter = list->begin(); iter != list->end(); ++iter) {
NativeWindow* window = *iter;
for (const auto& window : WindowList::GetWindows()) {
if (window->IsVisible()) {
window->Focus(true);
break;