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
merged 3 commits into from
Dec 20, 2022

Conversation

knopp
Copy link
Member

@knopp knopp commented Dec 19, 2022

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
Member

@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
Copy link
Contributor

@a-wallen a-wallen left a comment

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
Copy link
Contributor

auto-submit bot commented Dec 19, 2022

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: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
…117354)

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

* 955a35a3b Fix signature logic in license tool (flutter/engine#38363)

* 6de29d1cb [macOS] Update FlutterView layer scale when backing properties change (flutter/engine#38402)
loic-sharma pushed a commit to loic-sharma/flutter-engine that referenced this pull request Jan 3, 2023
gspencergoog pushed a commit to gspencergoog/flutter that referenced this pull request Jan 19, 2023
…lutter#117354)

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

* 955a35a3b Fix signature logic in license tool (flutter/engine#38363)

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

Successfully merging this pull request may close these issues.

Moving a Flutter desktop window between screens can fail
4 participants