Add GetWindows helper that returns a vector
This commit is contained in:
parent
0883a9f966
commit
da5d7d72b0
5 changed files with 11 additions and 21 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue