Skip to content

fix build fail for wayland only platform#182057

Merged
robert-ancell merged 1 commit into
flutter:masterfrom
HuQian:master
Feb 9, 2026
Merged

fix build fail for wayland only platform#182057
robert-ancell merged 1 commit into
flutter:masterfrom
HuQian:master

Conversation

@HuQian

@HuQian HuQian commented Feb 8, 2026

Copy link
Copy Markdown
Contributor

this PR fix build fail on wayland only platform, and i wrap all X11-specific code with #ifdef GDK_WINDOWING_X11

fix issue #182056

Pre-launch Checklist

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

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

in my codebase, no x11 provideded. and compiler will give an error about #include<gdk/gdkx.h>
@flutter-dashboard

Copy link
Copy Markdown

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@google-cla

google-cla Bot commented Feb 8, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@github-actions github-actions Bot added engine flutter/engine related. See also e: labels. platform-linux Building on or for Linux specifically a: desktop Running on desktop labels Feb 8, 2026

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request addresses a build failure on Wayland-only platforms. The fix involves conditionally compiling X11-specific code in fl_opengl_manager.cc by using #ifdef GDK_WINDOWING_X11 directives. This affects the inclusion of the <gdk/gdkx.h> header and the logic for initializing the EGL display for an X11 backend.

@gaaclarke

Copy link
Copy Markdown
Member

@robert-ancell this looks good to me, can you please take a look?

@robert-ancell robert-ancell 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.

👍

@robert-ancell robert-ancell added this pull request to the merge queue Feb 9, 2026
Merged via the queue into flutter:master with commit 94c758f Feb 9, 2026
181 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 10, 2026
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Feb 10, 2026
Roll Flutter from e8f9dc50356d to 9bda20a11f1e (34 revisions)

flutter/flutter@e8f9dc5...9bda20a

2026-02-10 brackenavaron@gmail.com Remove Material import from focus_traversal_test.dart (flutter/flutter#180994)
2026-02-10 engine-flutter-autoroll@skia.org Roll Skia from 6e217430c052 to cffb3bf918df (1 revision) (flutter/flutter#182131)
2026-02-10 divyansh.shah.ece23@itbhu.ac.in Encourage splitting large test files in testing documentation 2 (flutter/flutter#182051)
2026-02-10 34465683+rkishan516@users.noreply.github.com refactor: migrate CupertinoPageTransitionsBuilder to cupertino folder (flutter/flutter#179776)
2026-02-10 30870216+gaaclarke@users.noreply.github.com Delete the last remaining skia only fragment shader tests (flutter/flutter#182127)
2026-02-10 jhy03261997@gmail.com [a11y][android] Set new CheckState APIs for android API 36  (flutter/flutter#182113)
2026-02-10 dkwingsmt@users.noreply.github.com Add missing dependencies to framework_tests_misc_leak_tracking (flutter/flutter#181929)
2026-02-10 engine-flutter-autoroll@skia.org Roll Dart SDK from eee0e2e11174 to 69eb951f8f7e (2 revisions) (flutter/flutter#182128)
2026-02-10 fluttergithubbot@gmail.com Marks Linux_android_emu android_display_cutout to be flaky (flutter/flutter#181901)
2026-02-10 737941+loic-sharma@users.noreply.github.com Bump Dart to 3.10 (flutter/flutter#174066)
2026-02-10 engine-flutter-autoroll@skia.org Roll Skia from d4b7e24a209b to 6e217430c052 (6 revisions) (flutter/flutter#182126)
2026-02-09 15619084+vashworth@users.noreply.github.com Intercept UIScene device log and print a guided warning (flutter/flutter#181515)
2026-02-09 47866232+chunhtai@users.noreply.github.com Introduce ScrollCacheExtent and also fixes unbound shrinkwrap cache ex… (flutter/flutter#181092)
2026-02-09 43054281+camsim99@users.noreply.github.com [Android] Add mechanism for setting Android engine flags via Android manifest (take 2) (flutter/flutter#181632)
2026-02-09 116356835+AbdeMohlbi@users.noreply.github.com Fix wrong comment about default impeller value (flutter/flutter#181831)
2026-02-09 huqian123hq@hotmail.com fix build fail for wayland only platform (flutter/flutter#182057)
2026-02-09 jesswon@google.com [AGP 9] Added Warning Against Updating to AGP 9 (flutter/flutter#181977)
2026-02-09 30870216+gaaclarke@users.noreply.github.com Updated Shaderc dep (flutter/flutter#180976)
2026-02-09 47866232+chunhtai@users.noreply.github.com Refactor accessibility guidelines out to widget layer (flutter/flutter#181672)
2026-02-09 engine-flutter-autoroll@skia.org Roll Skia from 68dff53238e5 to d4b7e24a209b (2 revisions) (flutter/flutter#182087)
2026-02-09 ikramhasan.dev@gmail.com fix: OutlineInputBorder not respecting BorderSide stroke alignment (flutter/flutter#180487)
2026-02-09 97480502+b-luk@users.noreply.github.com Adds opengles to engine dart tests (flutter/flutter#181933)
2026-02-09 15619084+vashworth@users.noreply.github.com Add command to build a Swift Package for Add to App and generate FlutterPluginRegistrant (flutter/flutter#181224)
2026-02-09 116356835+AbdeMohlbi@users.noreply.github.com Remove unused constant in `bundle.dart` (flutter/flutter#182023)
2026-02-09 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from iqtwdXlgKIyZkL5Li... to 7BGf7mPQvgLi7Axb6... (flutter/flutter#182082)
2026-02-09 116356835+AbdeMohlbi@users.noreply.github.com Remove unused getters in `user_messages.dart` (flutter/flutter#181867)
2026-02-09 engine-flutter-autoroll@skia.org Roll Packages from 7805d3e to 3d5eaa5 (3 revisions) (flutter/flutter#182083)
2026-02-09 engine-flutter-autoroll@skia.org Roll Skia from 5d891cd7fb7f to 68dff53238e5 (1 revision) (flutter/flutter#182080)
2026-02-09 robert.ancell@canonical.com Update example description (flutter/flutter#182067)
2026-02-09 engine-flutter-autoroll@skia.org Roll Dart SDK from 965b51c219d3 to eee0e2e11174 (1 revision) (flutter/flutter#182073)
2026-02-09 engine-flutter-autoroll@skia.org Roll Skia from 9533d7533d59 to 5d891cd7fb7f (6 revisions) (flutter/flutter#182070)
2026-02-09 jwren@google.com Add a new flutter cli command, running-apps, using mDNS app discovery (flutter/flutter#180098)
2026-02-09 engine-flutter-autoroll@skia.org Roll Skia from b7db9f35f0f2 to 9533d7533d59 (2 revisions) (flutter/flutter#182069)
2026-02-08 robert.ancell@canonical.com Improve FlWindowMonitor API (flutter/flutter#181885)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC boetger@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

...
flutter-zl pushed a commit to flutter-zl/flutter that referenced this pull request Feb 10, 2026
<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

this PR fix build fail on wayland only platform, and i wrap all
X11-specific code with `#ifdef GDK_WINDOWING_X11`

fix issue flutter#182056


## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

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

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
rickhohler pushed a commit to rickhohler/flutter that referenced this pull request Feb 19, 2026
<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

this PR fix build fail on wayland only platform, and i wrap all
X11-specific code with `#ifdef GDK_WINDOWING_X11`

fix issue flutter#182056


## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

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

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
mboetger pushed a commit to mboetger/flutter that referenced this pull request Mar 26, 2026
<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

this PR fix build fail on wayland only platform, and i wrap all
X11-specific code with `#ifdef GDK_WINDOWING_X11`

fix issue flutter#182056


## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

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

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
creatorpiyush pushed a commit to creatorpiyush/packages that referenced this pull request Jun 10, 2026
…r#10992)

Roll Flutter from e8f9dc50356d to 9bda20a11f1e (34 revisions)

flutter/flutter@e8f9dc5...9bda20a

2026-02-10 brackenavaron@gmail.com Remove Material import from focus_traversal_test.dart (flutter/flutter#180994)
2026-02-10 engine-flutter-autoroll@skia.org Roll Skia from 6e217430c052 to cffb3bf918df (1 revision) (flutter/flutter#182131)
2026-02-10 divyansh.shah.ece23@itbhu.ac.in Encourage splitting large test files in testing documentation 2 (flutter/flutter#182051)
2026-02-10 34465683+rkishan516@users.noreply.github.com refactor: migrate CupertinoPageTransitionsBuilder to cupertino folder (flutter/flutter#179776)
2026-02-10 30870216+gaaclarke@users.noreply.github.com Delete the last remaining skia only fragment shader tests (flutter/flutter#182127)
2026-02-10 jhy03261997@gmail.com [a11y][android] Set new CheckState APIs for android API 36  (flutter/flutter#182113)
2026-02-10 dkwingsmt@users.noreply.github.com Add missing dependencies to framework_tests_misc_leak_tracking (flutter/flutter#181929)
2026-02-10 engine-flutter-autoroll@skia.org Roll Dart SDK from eee0e2e11174 to 69eb951f8f7e (2 revisions) (flutter/flutter#182128)
2026-02-10 fluttergithubbot@gmail.com Marks Linux_android_emu android_display_cutout to be flaky (flutter/flutter#181901)
2026-02-10 737941+loic-sharma@users.noreply.github.com Bump Dart to 3.10 (flutter/flutter#174066)
2026-02-10 engine-flutter-autoroll@skia.org Roll Skia from d4b7e24a209b to 6e217430c052 (6 revisions) (flutter/flutter#182126)
2026-02-09 15619084+vashworth@users.noreply.github.com Intercept UIScene device log and print a guided warning (flutter/flutter#181515)
2026-02-09 47866232+chunhtai@users.noreply.github.com Introduce ScrollCacheExtent and also fixes unbound shrinkwrap cache ex… (flutter/flutter#181092)
2026-02-09 43054281+camsim99@users.noreply.github.com [Android] Add mechanism for setting Android engine flags via Android manifest (take 2) (flutter/flutter#181632)
2026-02-09 116356835+AbdeMohlbi@users.noreply.github.com Fix wrong comment about default impeller value (flutter/flutter#181831)
2026-02-09 huqian123hq@hotmail.com fix build fail for wayland only platform (flutter/flutter#182057)
2026-02-09 jesswon@google.com [AGP 9] Added Warning Against Updating to AGP 9 (flutter/flutter#181977)
2026-02-09 30870216+gaaclarke@users.noreply.github.com Updated Shaderc dep (flutter/flutter#180976)
2026-02-09 47866232+chunhtai@users.noreply.github.com Refactor accessibility guidelines out to widget layer (flutter/flutter#181672)
2026-02-09 engine-flutter-autoroll@skia.org Roll Skia from 68dff53238e5 to d4b7e24a209b (2 revisions) (flutter/flutter#182087)
2026-02-09 ikramhasan.dev@gmail.com fix: OutlineInputBorder not respecting BorderSide stroke alignment (flutter/flutter#180487)
2026-02-09 97480502+b-luk@users.noreply.github.com Adds opengles to engine dart tests (flutter/flutter#181933)
2026-02-09 15619084+vashworth@users.noreply.github.com Add command to build a Swift Package for Add to App and generate FlutterPluginRegistrant (flutter/flutter#181224)
2026-02-09 116356835+AbdeMohlbi@users.noreply.github.com Remove unused constant in `bundle.dart` (flutter/flutter#182023)
2026-02-09 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from iqtwdXlgKIyZkL5Li... to 7BGf7mPQvgLi7Axb6... (flutter/flutter#182082)
2026-02-09 116356835+AbdeMohlbi@users.noreply.github.com Remove unused getters in `user_messages.dart` (flutter/flutter#181867)
2026-02-09 engine-flutter-autoroll@skia.org Roll Packages from 7805d3e to 3d5eaa5 (3 revisions) (flutter/flutter#182083)
2026-02-09 engine-flutter-autoroll@skia.org Roll Skia from 5d891cd7fb7f to 68dff53238e5 (1 revision) (flutter/flutter#182080)
2026-02-09 robert.ancell@canonical.com Update example description (flutter/flutter#182067)
2026-02-09 engine-flutter-autoroll@skia.org Roll Dart SDK from 965b51c219d3 to eee0e2e11174 (1 revision) (flutter/flutter#182073)
2026-02-09 engine-flutter-autoroll@skia.org Roll Skia from 9533d7533d59 to 5d891cd7fb7f (6 revisions) (flutter/flutter#182070)
2026-02-09 jwren@google.com Add a new flutter cli command, running-apps, using mDNS app discovery (flutter/flutter#180098)
2026-02-09 engine-flutter-autoroll@skia.org Roll Skia from b7db9f35f0f2 to 9533d7533d59 (2 revisions) (flutter/flutter#182069)
2026-02-08 robert.ancell@canonical.com Improve FlWindowMonitor API (flutter/flutter#181885)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC boetger@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: desktop Running on desktop engine flutter/engine related. See also e: labels. platform-linux Building on or for Linux specifically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants