[kcolorchooser] [Bug 479406] The "Pick Screen Color" button is missing on Wayland session

Thomas Weißschuh bugzilla_noreply at kde.org
Sat May 18 11:16:00 BST 2024


https://bugs.kde.org/show_bug.cgi?id=479406

Thomas Weißschuh <thomas at t-8ch.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thomas at t-8ch.de

--- Comment #17 from Thomas Weißschuh <thomas at t-8ch.de> ---
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<QDialogButtonBox*>();
```

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Unassigned-bugs mailing list