Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[macOS] Update FlutterView layer scale when backing properties change#38402

Merged
tgucio merged 3 commits into
flutter-team-archive:mainfrom
knopp:update_layer_scale
Dec 20, 2022
Merged

[macOS] Update FlutterView layer scale when backing properties change#38402
tgucio merged 3 commits into
flutter-team-archive:mainfrom
knopp:update_layer_scale

Conversation

@knopp

@knopp knopp commented Dec 19, 2022

Copy link
Copy Markdown
Contributor

This fixes problem introduced in #37789.

CALayer scale is used to position surfaces, but the scale is not updated when backing window properties change.

Implementing CALayer's delegate (FlutterView) [layer:shouldInheritContentsScale:fromWindow:] takes care of this.

Fixes flutter/flutter#117247

List which issues are fixed by this PR. You must list at least one issue.

If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@goderbauer

Copy link
Copy Markdown
Contributor

@knopp Thanks for the quick fix! Looks like the license script is unhappy. Could you take a look?

@goderbauer goderbauer requested a review from a-wallen December 19, 2022 18:35

@a-wallen a-wallen 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.

LGTM

@a-wallen a-wallen added the autosubmit Merge PR when tree becomes green via auto submit App label Dec 19, 2022
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Dec 19, 2022
@auto-submit

auto-submit Bot commented Dec 19, 2022

Copy link
Copy Markdown
Contributor

auto label is removed for flutter/engine, pr: 38402, Failed to merge pr#: 38402 with Pull request could not be merged: Resource not accessible by integration.

@tgucio tgucio merged commit 6de29d1 into flutter-team-archive:main Dec 20, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 20, 2022
auto-submit Bot pushed a commit to flutter/flutter that referenced this pull request Dec 20, 2022
* 3431669 Bump ossf/scorecard-action from 2.0.4 to 2.1.1 (flutter-team-archive/engine#38406)

* 955a35a Fix signature logic in license tool (flutter-team-archive/engine#38363)

* 6de29d1 [macOS] Update FlutterView layer scale when backing properties change (flutter-team-archive/engine#38402)
gspencergoog pushed a commit to gspencergoog/flutter that referenced this pull request Jan 19, 2023
…7354)

* 3431669 Bump ossf/scorecard-action from 2.0.4 to 2.1.1 (flutter-team-archive/engine#38406)

* 955a35a Fix signature logic in license tool (flutter-team-archive/engine#38363)

* 6de29d1 [macOS] Update FlutterView layer scale when backing properties change (flutter-team-archive/engine#38402)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Development

Successfully merging this pull request may close these issues.

Moving a Flutter desktop window between screens can fail

4 participants