SUMMARY In master version the setAvailableScreenRegion is not working and fails with message: QDBusMarshaller: type `QRegion' (72) is not registered with D-BUS. Use qDBusRegisterMetaType to register it STEPS TO REPRODUCE 1. Run Latte with latte-dock -d 2. observe the Latte output that the previous message is appearing and informs that the QDBus setAvailableScreenRegion is not applied SOFTWARE/OS VERSIONS KDE Plasma Version: 5.18.1 KDE Frameworks Version: 5.67.0 Qt Version: 5.14.1
That method wants a QList<QRect> argument, not a QRegion one. You have to convert QRegion to QList<QRect>. See: https://phabricator.kde.org/source/plasma-workspace/browse/master/shell/strutmanager.cpp;38757fb52d81ff4bb3a923ff1d3dc4f512095a0c$87
Git commit a7f786d87f1df4fd5a083175839e73c2ab519624 by Michail Vourlakos. Committed on 07/03/2020 at 05:47. Pushed by mvourlakos into branch 'master'. change QRegion to QList for dbus plasma call --change how dbus arguments are sent to Plasma and a QList arguments for this M +18 -2 app/plasma/extended/screengeometries.cpp https://commits.kde.org/latte-dock/a7f786d87f1df4fd5a083175839e73c2ab519624
(In reply to trmdi from comment #1) > That method wants a QList<QRect> argument, not a QRegion one. You have to > convert QRegion to QList<QRect>. > See: > https://phabricator.kde.org/source/plasma-workspace/browse/master/shell/ > strutmanager.cpp;38757fb52d81ff4bb3a923ff1d3dc4f512095a0c$87 Can you please check that everything is fine with https://phabricator.kde.org/source/latte-dock/browse/master/app/plasma/extended/screengeometries.cpp$95 , how it sends the dbus data to plasma ?
(In reply to Michail Vourlakos from comment #3) > (In reply to trmdi from comment #1) > > That method wants a QList<QRect> argument, not a QRegion one. You have to > > convert QRegion to QList<QRect>. > > See: > > https://phabricator.kde.org/source/plasma-workspace/browse/master/shell/ > > strutmanager.cpp;38757fb52d81ff4bb3a923ff1d3dc4f512095a0c$87 > > Can you please check that everything is fine with > https://phabricator.kde.org/source/latte-dock/browse/master/app/plasma/ > extended/screengeometries.cpp$95 , how it sends the dbus data to plasma ? With this commit, plasmashell doesn't get the data. I think you could revert this commit, then do like this: 1, add qDBusRegisterMetaType<QList<QRect>>() in the init method. 2, Modify that part like this: > m_lastAvailableRegion[scrName] = availableRegion; > QList<QRect> rects; > foreach (const QRect &rect, availableRegion) { > rects << rect; > } > plasmaStrutsIface.call("setAvailableScreenRegion", LATTESERVICE, scrName, QVariant::fromValue(rects)); > qDebug() << " PLASMA SCREEN GEOMETRIES AVAILABLE REGION :: " << screen->name() << " : " << availableRegion;
Git commit f31cc660b4dfdec4c64d0f269f43366a0ea8b2b2 by Michail Vourlakos. Committed on 07/03/2020 at 08:20. Pushed by mvourlakos into branch 'master'. send QRegion through dbus as QList<QRect> M +10 -1 app/plasma/extended/screengeometries.cpp https://commits.kde.org/latte-dock/f31cc660b4dfdec4c64d0f269f43366a0ea8b2b2