Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
Add a bypass for wayland extension checks
Luna Lovecraft2801f8416677
diff --git a/plugins/platforms/wayland/KisWaylandRegistry.cpp b/plugins/platforms/wayland/KisWaylandRegistry.cppindex 3e39da90f5..bc95fcd2f6 100644--- a/plugins/platforms/wayland/KisWaylandRegistry.cpp+++ b/plugins/platforms/wayland/KisWaylandRegistry.cpp@@ -31,6 +31,10 @@ void KisWaylandRegistry::registry_global(uint32_t name, const QString &interfacebool KisWaylandRegistry::globalExists(const QString& interface){+ if (qEnvironmentVariable("KRITA_FORCE_WAYLAND_INTERFACES").split(u',').contains(interface)) {+ return true;+ }+//Check if the interface is explicitly disabledstatic QStringList interfaceBlacklist = qEnvironmentVariable("QT_WAYLAND_DISABLED_INTERFACES").split(u',');diff --git a/plugins/platforms/wayland/waylandcolormanagement/WAYLAND_HACKING.md b/plugins/platforms/wayland/waylandcolormanagement/WAYLAND_HACKING.mdindex ad2dacc9d5..8e33dddf25 100644--- a/plugins/platforms/wayland/waylandcolormanagement/WAYLAND_HACKING.md+++ b/plugins/platforms/wayland/waylandcolormanagement/WAYLAND_HACKING.md@@ -112,3 +112,20 @@ QT_QPA_PLATFORM=wayland QT_WAYLAND_DISABLED_INTERFACES=zxdg_decoration_manager_vQT_QPA_PLATFORM=wayland QT_WAYLAND_DISABLED_INTERFACES=zxdg_decoration_manager_v1 QT_WAYLAND_DECORATION=bradient krita```++## How to test an extension, unsupported in your compositor++If you want to test code related to an extension that your compositor doesn't support,+you can bypass Krita's checks for the extension by passing the following environment variable:++```bash+KRITA_FORCE_WAYLAND_INTERFACES=*list of extension names*+```++For example to force Krita to do wayland color management on an unsupported compositor, you can pass:++```bash+KRITA_FORCE_WAYLAND_INTERFACES=wp_color_manager_v1+```++Note: The extension will **NOT** function properly if you do this.