On 01.05.2021 11:44, Germano Massullo wrote:
Let's wait also for Jan Grulich. He should be back next days/weeks

Yes, but my simple workaround works fine. We need to add a new method:

```c++
#ifdef Q_OS_LINUX
void wayland_hacks()
{
    // Workaround to https://github.com/ksnip/ksnip/issues/416
    QByteArray currentDesktop = qgetenv("XDG_CURRENT_DESKTOP").toLower();
    QByteArray sessionDesktop = qgetenv("XDG_SESSION_DESKTOP").toLower();
    QByteArray sessionType = qgetenv("XDG_SESSION_TYPE").toLower();
if (sessionType.contains("wayland") && (currentDesktop.contains("gnome") || sessionDesktop.contains("gnome")))
    {
        qputenv("QT_QPA_PLATFORM", "xcb");
    }
}
#endif
```

Then call it in main(), just before the QApplication initialization:

```c++
int main(int argc, char** argv)
 {
#ifdef Q_OS_LINUX
    wayland_hacks();
#endif
    QApplication app(argc, argv);
}
```

--
Sincerely,
  Vitaly Zaitsev (vit...@easycoding.org)
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to