[kcolorchooser] [Bug 479406] The "Pick Screen Color" button is missing on Wayland session
https://bugs.kde.org/show_bug.cgi?id=479406 Thomas Weißschuh changed: What|Removed |Added Latest Commit||https://invent.kde.org/grap ||hics/kcolorchooser/-/commit ||/dace6c0d2b04b444b4e4a92045 ||0a7ed24b79cc30 Resolution|--- |FIXED Status|CONFIRMED |RESOLVED --- Comment #18 from Thomas Weißschuh --- Git commit dace6c0d2b04b444b4e4a920450a7ed24b79cc30 by Thomas Weißschuh. Committed on 21/05/2024 at 18:02. Pushed by nicolasfella into branch 'master'. Allow dbus processing in qt-base to enable color-picking via portal qt-base uses dbus to query the desktop portal if color-picking is supported, without explicitly waiting for the result. kcolorchooser creates its QColorDialog before the response was processed and therefore color picking via the portal is presumed to be unavailable. Give the eventloop the opportunity to process the event and only afterwards create the QColorDialog. See https://bugreports.qt.io/browse/QTBUG-120957 M +3-0kcolorchooser.cpp https://invent.kde.org/graphics/kcolorchooser/-/commit/dace6c0d2b04b444b4e4a920450a7ed24b79cc30 -- You are receiving this mail because: You are watching all bug changes.
[kcolorchooser] [Bug 479406] The "Pick Screen Color" button is missing on Wayland session
https://bugs.kde.org/show_bug.cgi?id=479406 Thomas Weißschuh changed: What|Removed |Added CC||tho...@t-8ch.de --- Comment #17 from Thomas Weißschuh --- This is a racecondition in QT. See https://bugreports.qt.io/browse/QTBUG-120957?focusedId=794902&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-794902 The following workaround in kcolorchooser works for me: ``` diff --git a/kcolorchooser.cpp b/kcolorchooser.cpp index 97297071e07e..bd9c6ef6cf94 100644 --- a/kcolorchooser.cpp +++ b/kcolorchooser.cpp @@ -67,6 +67,9 @@ int main(int argc, char *argv[]) QApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("kcolorchooser"))); +/* Work around https://bugreports.qt.io/browse/QTBUG-120957 */ +app.processEvents(); + QColorDialog dlg; dlg.setOption(QColorDialog::DontUseNativeDialog); QDialogButtonBox *box = dlg.findChild(); ``` -- You are receiving this mail because: You are watching all bug changes.