Skip to content
This repository was 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
bluemarvin merged 1 commit into
masterfrom
flat_curved_switch
Aug 8, 2019
Merged

Update SurfaceChanged callback target when a Surface is moved to a different layer#1540
bluemarvin merged 1 commit into
masterfrom
flat_curved_switch

Conversation

@MortimerGoro

@MortimerGoro MortimerGoro commented Aug 8, 2019

Copy link
Copy Markdown
Contributor

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)

@bluemarvin bluemarvin left a comment

Copy link
Copy Markdown
Contributor

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