Skip to content

[qtmozembed] Disconnect inactive web page from draw overlay#150

Open
rainemak wants to merge 1 commit intotmeshkova:masterfrom
rainemak:drawOverlayFix
Open

[qtmozembed] Disconnect inactive web page from draw overlay#150
rainemak wants to merge 1 commit intotmeshkova:masterfrom
rainemak:drawOverlayFix

Conversation

@rainemak
Copy link
Copy Markdown
Contributor

@rainemak rainemak commented Nov 3, 2015

We're not rendering inactive web pages. Thus, window level draw overlay should not trigger onDrawOverlay handler for inactive pages => let's disconnect always when activity changes and enable connection only if we're activating.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Here could be an else clause with the disconnect statement moved from above.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

setWindow and connecting again would add another connection then. Has like that while doing this. It's just safer to disconnect first and connect only if active.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The line 185 makes sure that this condition is checked only if mActive changes its value, so it's unlikely that connect is called twice when setActive(true) is called twice as well. But yes, for the sake of readability it's safer to try to disconnect always.

@rojkov
Copy link
Copy Markdown
Collaborator

rojkov commented Nov 3, 2015

LGTM

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.

2 participants