Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Update SurfaceChanged callback target when a Surface is moved to a different layer #1540

Merged
merged 1 commit into from
Aug 8, 2019

Conversation

MortimerGoro
Copy link
Contributor

@MortimerGoro MortimerGoro commented Aug 8, 2019

Fixes #1536
The problems happens when the flat/curved switch is done to a widget that has never been rendered (e.g. the keyboard starts invisible). The layer waits to receive the first composite notification to allow rendering it. But when a surface is moved to a new layer (e.g. flat to curved) the old layer still receives the callback. This PR also prevents a potential crash if the callback is received after a layer is deallocated (it can happen due to UI and native render thread differences)

Copy link
Contributor

@bluemarvin bluemarvin left a comment

Choose a reason for hiding this comment

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

I'm a little concerned about the maintainability of this code. Perhaps for 1.5 we can look at some refactoring.

@bluemarvin bluemarvin merged commit 84b9cbd into master Aug 8, 2019
@bluemarvin bluemarvin deleted the flat_curved_switch branch August 8, 2019 19:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Keyboard fails to render when switching to curved windows.
2 participants