Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mobileDriver.currentWindow should not return hidden windows, fixes #1835 #1986

Merged
merged 1 commit into from Feb 21, 2021

Conversation

fpabl0
Copy link
Member

@fpabl0 fpabl0 commented Feb 20, 2021

Description:

Fixes #1835

Checklist:

  • Tests included. (not sure how to test mobile driver)
  • Lint and formatter run with no errors.
  • Tests all pass.

}
}

return last
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code will return the last hidden window if they are all hidden - is that intended?
Above we return nil if there are no windows, I think we should do that here too

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code will return the last hidden window if they are all hidden - is that intended?

Yes, that was intended.

Above we return nil if there are no windows, I think we should do that here too

That was something that I was not sure. In mobile, if all the windows are hidden, what does it mean? 🤔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should not be done - app will be unusable. But not sure that the most recently added window is the right response in this situation... It should never happen, but there is specifically code in their to accommodate it so I figured we should be sure that is what should occur if it can.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But not sure that the most recently added window is the right response in this situation...

Indeed this change is returning the parent window (not the most recently added) because I am looping in reverse. Now I realized I have misread your first comment. It is not the last hidden window but the first one (parent one).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes I see, sorry for misreading the first time

@andydotxyz
Copy link
Member

Looks good to me, as the original reporter @Jacalz could you please test this as well?

@andydotxyz andydotxyz dismissed their stale review February 21, 2021 13:05

Misread the loop order. Question is open, but not a blocker now

@andydotxyz andydotxyz merged commit de2bd50 into fyne-io:develop Feb 21, 2021
@fpabl0 fpabl0 deleted the fix/1835 branch February 21, 2021 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants