Bug 445968 - Krita flashes bright white pages when I launch the program and open various dialog boxes.
Summary: Krita flashes bright white pages when I launch the program and open various d...
Status: RESOLVED UPSTREAM
Alias: None
Product: krita
Classification: Applications
Component: Usability (show other bugs)
Version: 4.4.8
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL: https://bugreports.qt.io/browse/QTBUG...
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-23 10:18 UTC by hondatohrufan
Modified: 2022-09-20 12:13 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
The video file demonstrates Krita flashing a white page when I launch the program and open dialog boxes. (672.10 KB, video/mp4)
2021-11-23 10:18 UTC, hondatohrufan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hondatohrufan 2021-11-23 10:18:45 UTC
Created attachment 143862 [details]
The video file demonstrates Krita flashing a white page when I launch the program and open dialog boxes.

SUMMARY
Krita flashes bright white pages when I launch the program and open various dialog boxes, straining my eyes, contributing to other health-related issues.

STEPS TO REPRODUCE
1. Launch Krita or open various dialog boxes. You may need to pay close attention because the white page is sometimes so fast that it is hardly noticeable.

OBSERVED RESULT
Krita flashes a bright white page.

EXPECTED RESULT
I expected smooth GUI animations without any flashes.

SOFTWARE/OS VERSIONS
Windows: Windows 10 20H2 (up to date) 64-bit

ADDITIONAL INFORMATION
This problem occurs in other Windows software (but not their Linux counterparts), e.g., Shotcut. The lead developer of Shotcut determined the problem is related to Qt behavior and slated a workaround for version 21.11. Since that version is not yet available, I am unsure how well the workaround works in practice, but it involves adjusting the window opacity. See the GitHub link for details.

https://github.com/mltframework/shotcut/issues/1168
Comment 1 Alvin Wong 2021-11-23 11:36:01 UTC
The workaround that Shotcut uses is not one that we can just go apply it to every top-level window. I don't think that is the right approach and I don't think it can even be applied to most dialogs anyway (e.g. those that uses `QDialog::exec`).

The root cause is probably somewhere in Qt and hard to locate. I suspect it might have something to do with Qt starting an event loop introducing a delay to the initial paint event, and because `QDialog::exec` starts an additional event loop, every dialog opened using this call would show the same behaviour. If my guess is correct, then this will happen to literally every application using Qt and it should be reported upstream instead.
Comment 2 Halla Rempt 2021-11-23 14:27:36 UTC
Yes, given that it's been reported for three Qt applications, it's not a bug in Krita. I definitely don't want to hack around with the windows opacity or things like this. So, yes, the bug should be reported here: https://bugreports.qt.io/, and this report closed once we have the upstream bug.
Comment 3 hondatohrufan 2021-12-05 19:31:14 UTC
Does either of you know whether Chromium-based web browsers use Qt? Every Chromium-based web browser, as well as Firefox, has this problem, too. The only exception is Vivaldi, which, unlike other web browsers, displays a splash screen when I open a window, and the splash screen is matte black when dark mode is enabled.

I made a Qt account and attempted to create a new issue, but I am unsure what to put for "Project," "Affected version/s," and "Component/s." These fields are required. It seems like the bug tracker is for developers, which is the impression I got when I tried to report a technical issue at qt.com. The report required a company name, my role, etc.
Comment 4 Halla Rempt 2021-12-06 10:44:56 UTC
Firefox, Chromium and Edge all use toolkits other than Qt.
Comment 5 Alvin Wong 2021-12-07 13:52:18 UTC
Reported upstream as https://bugreports.qt.io/browse/QTBUG-98997

I wanted to first reproduce it on Qt 6.2 with a minimal test example before making an upstream report, but seeing it happen on latest Qt Creator was enough.
Comment 6 hondatohrufan 2021-12-21 05:23:09 UTC
(In reply to Alvin Wong from comment #5)
> Reported upstream as https://bugreports.qt.io/browse/QTBUG-98997
> 
> I wanted to first reproduce it on Qt 6.2 with a minimal test example before
> making an upstream report, but seeing it happen on latest Qt Creator was
> enough.

Thank you for reporting this, even noting its adverse effects. Something of note is that the lead developer of Shotcut said he observed this issue on macOS, too:

https://github.com/mltframework/shotcut/issues/1168#issuecomment-945063347