Skip to content

[Linux] Flutter window flickers when scaffold background colour is set to transparent. #120254

Closed

Description

@whiskeyPeak

This only happens when the background colour has a shade of transparency. The flickering also seems to mainly be caused by trackpad gestures.

This is reproducible on both stable and master.

simplescreenrecorder-2023-02-08_02.39.59.mp4

Flutter doctor:

[✓] Flutter (Channel stable, 3.7.1, on LMDE 5 (elsie) 5.10.0-21-amd64, locale
    en_GB.UTF-8)
    • Flutter version 3.7.1 on channel stable at
      /home/henryr/Dev/SDK/Flutter/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 7048ed95a5 (6 days ago), 2023-02-01 09:07:31 -0800
    • Engine revision 800594f1f4
    • Dart version 2.19.1
    • DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /home/henryr/Android/Sdk
    • Platform android-33, build-tools 33.0.1
    • Java binary at: /home/henryr/Dev/SDK/AndroidStudio/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • Debian clang version 11.0.1-2
    • cmake version 3.18.4
    • ninja version 1.10.1
    • pkg-config version 0.29.2

[✓] Android Studio (version 2021.3)
    • Android Studio at /home/henryr/Dev/SDK/AndroidStudio/android-studio
    • Flutter plugin version 71.0.3
    • Dart plugin version 213.7433
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • LMDE 5 (elsie) 5.10.0-21-amd64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 109.0.5414.119

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Repro code:

import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: HomePage(),
    );
  }
}

class HomePage extends StatefulWidget {
  const HomePage({Key? key}) : super(key: key);

  @override
  State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  var items = List.generate(
    100,
    (index) => const Text("Hello there"),
  );
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.transparent,
      body: ListView(
        children: items,
      ),
    );
  }
}

Activity

  1. added
    in triagePresently being triaged by the triage team
    on Feb 8, 2023
  2. exaby73 commented on Feb 8, 2023

    @exaby73
    Member

    Hello @whiskeyPeak. I cannot reproduce this issue with my machines. I tried on Manjaro running KDE Plasma as well as Ubuntu running Gnome

  3. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Feb 8, 2023
  4. whiskeyPeak commented on Feb 14, 2023

    @whiskeyPeak
    ContributorAuthor

    Hey @exaby73. Could you test this on the X11 version of the DE. Wayland works fine for me as well but the X11 backend is where this issue norally pops up. Thanks!

  5. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Feb 14, 2023
  6. huycozy commented on Feb 14, 2023

    @huycozy
    Member

    @whiskeyPeak I'm checking this on my Ubuntu (Xorg) but can not reproduce this issue (Ubuntu 22.04.1 LTS). The list can be scrolled normally without flicking.

    My uname -a output:

    Linux ubuntu 5.15.0-60-generic #66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
    

    Can you confirm this issue doesn't happen with mouse? It's only reproducible with trackpad?

    Also, can you please try opening DevTools and observe if there are any signs from the charts?

  7. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Feb 14, 2023
  8. whiskeyPeak commented on Feb 14, 2023

    @whiskeyPeak
    ContributorAuthor

    Hey @huycozy @exaby73
    The sample code i provided didn't actually make the background invisible (now updated).

    Also you need to change the following piece of code in my_application.cc

    if (use_header_bar) {
    

    to:

    if (!use_header_bar) {
    

    I can confirm this happens when scrolling with a mouse.

    Thank you for looking into this

  9. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Feb 14, 2023
  10. huycozy commented on Feb 15, 2023

    @huycozy
    Member

    @whiskeyPeak Unfortunately, after changing it, I still can not reproduce this issue. Can you please push your sample code to a GitHub repository and share it here?

  11. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Feb 15, 2023
  12. github-actions commented on Mar 8, 2023

    @github-actions

    Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now.
    If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones.
    Thanks for your contribution.

  13. github-actions commented on Mar 22, 2023

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  14. locked as resolved and limited conversation to collaborators on Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in triagePresently being triaged by the triage teamwaiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions