Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package waycheck for openSUSE:Factory 
checked in at 2023-10-01 21:22:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/waycheck (Old)
 and      /work/SRC/openSUSE:Factory/.waycheck.new.28202 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "waycheck"

Sun Oct  1 21:22:20 2023 rev:2 rq:1114442 version:0.2.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/waycheck/waycheck.changes        2023-09-29 
21:15:12.229277195 +0200
+++ /work/SRC/openSUSE:Factory/.waycheck.new.28202/waycheck.changes     
2023-10-01 21:23:21.602933188 +0200
@@ -1,0 +2,12 @@
+Thu Sep 28 19:59:06 UTC 2023 - Neal Gompa <ngo...@opensuse.org>
+
+- Update to v0.2.0
+  + Add KDE and Weston protocols
+  + Use a tabbed view with separate tables for each protocol group
+  + Fix contrast issues
+  + Update icon
+  + Prevent editing table cells
+  + Only allow selecting one cell at a time
+  + Fix icon not showing in window decorations on KDE Plasma
+
+-------------------------------------------------------------------

Old:
----
  waycheck-v0.1.3.tar.gz

New:
----
  waycheck-v0.2.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ waycheck.spec ++++++
--- /var/tmp/diff_new_pack.yzoAbe/_old  2023-10-01 21:23:22.658971400 +0200
+++ /var/tmp/diff_new_pack.yzoAbe/_new  2023-10-01 21:23:22.662971545 +0200
@@ -19,7 +19,7 @@
 %global qt6_minver 6.5
 
 Name:           waycheck
-Version:        0.1.3
+Version:        0.2.0
 Release:        0
 Summary:        GUI that displays protocols implemented by a Wayland compositor
 

++++++ waycheck-v0.1.3.tar.gz -> waycheck-v0.2.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/waycheck-v0.1.3/.gitlab-ci.yml 
new/waycheck-v0.2.0/.gitlab-ci.yml
--- old/waycheck-v0.1.3/.gitlab-ci.yml  2023-09-26 01:39:33.000000000 +0200
+++ new/waycheck-v0.2.0/.gitlab-ci.yml  2023-09-28 17:40:53.000000000 +0200
@@ -8,6 +8,8 @@
         - apk add build-base meson qt6-qtwayland-dev
         - meson setup build
         - meson compile -C build
+    rules:
+        - if: $CI_PIPELINE_SOURCE == "push"
 
 .build_rpmdistro: &rpmdistrobuild
     stage: build
@@ -15,6 +17,8 @@
         - dnf --assumeyes install meson gcc-c++ "pkgconfig(Qt6Core)" 
"pkgconfig(Qt6Gui)" "pkgconfig(Qt6WaylandClient)" "pkgconfig(Qt6Widgets)" 
"pkgconfig(wayland-client)"
         - meson setup build
         - meson compile -C build
+    rules:
+        - if: $CI_PIPELINE_SOURCE == "push"
 
 build-job-fedora:
     image: quay.io/fedora/fedora:latest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/waycheck-v0.1.3/README.md 
new/waycheck-v0.2.0/README.md
--- old/waycheck-v0.1.3/README.md       2023-09-26 01:39:33.000000000 +0200
+++ new/waycheck-v0.2.0/README.md       2023-09-28 17:40:53.000000000 +0200
@@ -5,3 +5,5 @@
 ## License
 
 Waycheck is licensed under the `Apache-2.0` open-source license.
+
+The logomark is inspired by the Wayland logomark, and was co-designed by 
Campbell Jones (@serebit) and Oliver Beard (@olib). It is dual-licensed under 
the terms of the `CC0-1.0` and `Apache-2.0` open-source licenses.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/waycheck-v0.1.3/meson.build 
new/waycheck-v0.2.0/meson.build
--- old/waycheck-v0.1.3/meson.build     2023-09-26 01:39:33.000000000 +0200
+++ new/waycheck-v0.2.0/meson.build     2023-09-28 17:40:53.000000000 +0200
@@ -1,7 +1,7 @@
 project(
     'waycheck',
     'cpp',
-    version: '0.1.3',
+    version: '0.2.0',
     license: 'Apache-2.0',
     meson_version: '>= 0.59.0',
     default_options: [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/waycheck-v0.1.3/resources/dev.serebit.Waycheck.metainfo.xml 
new/waycheck-v0.2.0/resources/dev.serebit.Waycheck.metainfo.xml
--- old/waycheck-v0.1.3/resources/dev.serebit.Waycheck.metainfo.xml     
2023-09-26 01:39:33.000000000 +0200
+++ new/waycheck-v0.2.0/resources/dev.serebit.Waycheck.metainfo.xml     
2023-09-28 17:40:53.000000000 +0200
@@ -2,32 +2,52 @@
 <!-- Copyright 2023 Campbell Jones <git at serebit dot com> -->
 <component type="desktop-application">
   <id>dev.serebit.Waycheck</id>
-  
-  <name>Waycheck</name>
-  <summary>Displays the protocols implemented by a Wayland compositor</summary>
-  
   <metadata_license>CC0-1.0</metadata_license>
   <project_license>Apache-2.0</project_license>
   
+  <name>Waycheck</name>
+  <summary>Displays the protocols implemented by a Wayland compositor</summary>
   <description>
     <p>
       Waycheck is a simple graphical application that connects to your Wayland 
compositor and displays the list of Wayland protocols that it supports, along 
with the list of protocols that it doesn&apos;t.
     </p>
   </description>
 
-  <url type="homepage">http://gitlab.freedesktop.org/serebit/waycheck</url>
+  <categories>
+    <category>Utility</category>
+    <category>System</category>
+    <category>Development</category>
+  </categories>
+  <keywords>
+    <keyword>wayland</keyword>
+  </keywords>
+  <branding>
+    <color type="primary">#194dff</color>
+  </branding>
+
   <developer_name>Campbell Jones</developer_name>
+  <url type="homepage">http://gitlab.freedesktop.org/serebit/waycheck</url>
+  <url 
type="bugtracker">https://gitlab.freedesktop.org/serebit/waycheck/-/issues</url>
+  <url type="contact">https://serebit.dev/contact</url>
+  <url type="vcs-browser">http://gitlab.freedesktop.org/serebit/waycheck</url>
 
   <launchable type="desktop-id">dev.serebit.Waycheck.desktop</launchable>
   <provides>
     <binary>waycheck</binary>
   </provides>
 
+  <requires>
+    <internet>offline-only</internet>
+  </requires>
+  <recommends>
+    <display_length compare="gt">xsmall</display_length>
+  </recommends>
   <supports>
     <control>pointing</control>
     <control>keyboard</control>
     <control>touch</control>
   </supports>
+
   <content_rating type="oars-1.1"/>
 
   <screenshots>
@@ -40,6 +60,19 @@
   </screenshots>
 
   <releases>
+    <release version="0.2.0" date="2023-09-28">
+      <description>
+        <ul>
+          <li>Add KDE and Weston protocols</li>
+          <li>Use a tabbed view with separate tables for each protocol 
group</li>
+          <li>Fix contrast issues</li>
+          <li>Update icon</li>
+          <li>Prevent editing table cells</li>
+          <li>Only allow selecting one cell at a time</li>
+          <li>Fix icon not showing in window decorations on KDE Plasma</li>
+        </ul>
+      </description>
+    </release>
     <release version="0.1.3" date="2023-09-25">
       <description>
         <p>Add screenshots to metainfo</p>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/waycheck-v0.1.3/resources/dev.serebit.Waycheck.svg 
new/waycheck-v0.2.0/resources/dev.serebit.Waycheck.svg
--- old/waycheck-v0.1.3/resources/dev.serebit.Waycheck.svg      2023-09-26 
01:39:33.000000000 +0200
+++ new/waycheck-v0.2.0/resources/dev.serebit.Waycheck.svg      2023-09-28 
17:40:53.000000000 +0200
@@ -1,6 +1,7 @@
-<svg xmlns="http://www.w3.org/2000/svg"; xml:space="preserve" width="266" 
height="266" viewBox="0 0 266 266">
-  <g transform="translate(-209 -332)">
-    <circle cx="341.4" cy="465.2" r="122.9" fill="#194dff"/>
-    <path fill="#fff" d="m258 483 49 57 115-122-23-20-92 97-30-34Z"/>
+<svg xmlns="http://www.w3.org/2000/svg"; viewBox="0 0 128 128">
+  <circle cx="64" cy="64" r="60" fill="#194dff"/>
+  <g fill="#f9f9f9">
+    <path d="M113.3 26c-4.3 4.1-7.8 9-10.3 14.5 0 0-1.3 4.1-3.2 6.3-1.9 
2.2-4.2 3.7-4.8 6.5-.5 2.8.4 4-1 5.7-1.3 1.6-5.3 4.9-5.7 6.2-.3 1.4-.7 7.2-1.8 
8.5-1 1.2-3.7 5.9-8.2 9.3-4.6 3.4-10.6 10.9-15 13-4.4 2.2-7.2 4.1-10 1.3a24.6 
24.6 0 0 1-4.8-8.3 16 16 0 0 
0-4.5-4.9c-1.5-1-2.6-3.8-2.7-5-.2-1-1.4-2.1-1.6-3-.2-.8-5.5-5.7-6.1-6.9-.6-1.2-2-2.7-2.1-3.8
 0-1-2.5-3.7-2.5-5 0-1.3.8-3.7 1.9-4 1-.4 3.3-1.3 5.3-1.3s4.4.2 5.4 1c1 .7 2.6 
3.3 2.8 4.3.3 1 2 2.4 2.3 3 .4.5 1.6 1.1 2 1.6.5.5.7.5.7 1l.5 1 1.4 1.4 3.4 
2.6c.4.3 3.3 2.3 4.2 2.6.9.2 3.4.2 3.9-.1a24 24 0 0 0 3.3-4.4l3.1-6.4c.6-1 
1.8-4.1 2-4.3.2-.2 1.6-1.5 2-2.2.3-.7 3.6-7.1 4-7.6.5-.5 1.4-2.4 2.6-3 1.1-.6 
8-11.8 9-14.3 1.2-2.6 3-4.3 3.8-5 .8-.7 1.1-1.1 1.3-2.5.2-1.4.7-4.4 1-5 .2-.8 
1-4.9 2.3-6.2 17-9.7 13.7 8.4 16.1 13.4zM53 7.5l.6.7s-.5-.3-2.3.2C50 8.8 49 10 
49 10s-.1-1-.9-1.3Zm2.4 0h4.4l.3.5-1.8.2-1.2-.2-1 .2z"/>
+    <path d="m90.5 29.2-2.4.2s-.3 0-.3.9c0 1 1.3 1.4 1.3 1.4zM78.8 
42.6c-1.8.6-2.5.6-2.8 1.4-.2.8 0 .7 0 .7h1.2l1.3-1.2zM75.3 32l-1 
.3v.5l.6.8h.6l.6-.6-.1-.6zm-8.9 29.1c-.3.2-1.5 1.3-1.2 1.6.2.3 1.2 1 1.2 
1l.8-1.4zm17.4 14.2s2.1-.7 2.9.2c.7.9 2 .3 2 .3s.5-1.3 
0-1.5c-.4-.1-1.3-.6-1.3-1 0-.5-.6-2-.3-2.5.2-.6-3.3 4.4-3.3 4.4zM32.2 51.1c-2 
.2-2.1 1-2.1 1l1.5-.2.7-.3zM22 62.6c1.8-.4 1.8-3.1 1.8-3.1h-.6L21.5 61zm8.6 
21.9-1.8 2.3.5.4 2.1-2.7zm27.8-57.7-3.8-1.9s.1.5-.5.7c-.6.3-.7 1-.7 1v.7s3 .3 
5-.5zm5.8-3.2c2.5-1 3-.8 3-.8s0 .5.8.2c.7-.3.8.4.8.4L65 24.5zm11.2-10.1c0 1.1-1 
1.3-1 1.3l-.4.2v.6l-1.3-.7.6-.9 1.5-.6zm-34 12c-2-1.8-2.8-1-2.8-1l.2.8s.5.6 
1.2.5c.7 0 1.4-.3 1.4-.3zm-3.7 10c1-2 3.7-2 3.7-2l-.9-.9-2.3-.8-.2.8-1 .4z"/>
   </g>
 </svg>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/waycheck-v0.1.3/src/main.cpp 
new/waycheck-v0.2.0/src/main.cpp
--- old/waycheck-v0.1.3/src/main.cpp    2023-09-26 01:39:33.000000000 +0200
+++ new/waycheck-v0.2.0/src/main.cpp    2023-09-28 17:40:53.000000000 +0200
@@ -6,10 +6,12 @@
 int main(int argc, char** argv) {
     auto app = QApplication(argc, argv);
 
+    app.setDesktopFileName(QStringLiteral("dev.serebit.Waycheck.desktop"));
+
     auto waylandApp = 
qApp->nativeInterface<QNativeInterface::QWaylandApplication>();
     QMessageBox msgBox;
     if (waylandApp == nullptr) {
-        msgBox.setText("This application is running outside of a Wayland 
session, and cannot start.");
+        msgBox.setText("Waycheck must be started within a Wayland session.");
         return msgBox.exec();
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/waycheck-v0.1.3/src/meson.build 
new/waycheck-v0.2.0/src/meson.build
--- old/waycheck-v0.1.3/src/meson.build 2023-09-26 01:39:33.000000000 +0200
+++ new/waycheck-v0.2.0/src/meson.build 2023-09-28 17:40:53.000000000 +0200
@@ -6,6 +6,7 @@
 
 waycheck_sources = [
     'main.cpp',
+    'protocols.cpp',
     'window.cpp',
     window_ui,
 ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/waycheck-v0.1.3/src/protocols.cpp 
new/waycheck-v0.2.0/src/protocols.cpp
--- old/waycheck-v0.1.3/src/protocols.cpp       1970-01-01 01:00:00.000000000 
+0100
+++ new/waycheck-v0.2.0/src/protocols.cpp       2023-09-28 17:40:53.000000000 
+0200
@@ -0,0 +1,20 @@
+#include "protocols.hpp"
+
+std::string status_to_string(ProtocolStatus status) {
+    switch (status) {
+        case STABLE:
+            return "Stable";
+        case STAGING:
+            return "Staging";
+        case UNSTABLE:
+            return "Unstable";
+        case WLROOTS:
+            return "Wlroots";
+        case KDE:
+            return "KDE";
+        case WESTON:
+            return "Weston";
+        default:
+            return "Unknown";
+    }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/waycheck-v0.1.3/src/protocols.hpp 
new/waycheck-v0.2.0/src/protocols.hpp
--- old/waycheck-v0.1.3/src/protocols.hpp       1970-01-01 01:00:00.000000000 
+0100
+++ new/waycheck-v0.2.0/src/protocols.hpp       2023-09-28 17:40:53.000000000 
+0200
@@ -0,0 +1,108 @@
+#ifndef WAYCHECK_PROTOCOLS_HPP
+#define WAYCHECK_PROTOCOLS_HPP
+
+#include <string>
+#include <unordered_map>
+
+enum ProtocolStatus {
+    UNKNOWN,
+    STABLE,
+    STAGING,
+    UNSTABLE,
+    WLROOTS,
+    KDE,
+    WESTON,
+};
+
+struct Protocol {
+    ProtocolStatus status;
+    std::string pretty;
+    std::string name;
+};
+
+// clang-format off
+static std::unordered_map<std::string, const Protocol> known_protocols = {
+    {"wp_presentation", {STABLE, "Presentation time", "presentation-time"}},
+    {"wp_viewporter", {STABLE, "Viewporter", "viewporter"}},
+    {"xdg_wm_base", {STABLE, "XDG shell", "xdg-shell"}},
+
+    {"xdg_activation_v1", {STAGING, "XDG activation", "xdg-activation-v1"}},
+    {"wp_drm_lease_v1", {STAGING, "DRM lease", "drm-lease-v1"}},
+    {"ext_session_lock_manager_v1", {STAGING, "Session lock", 
"ext-session-lock-v1"}},
+    {"wp_single_pixel_buffer_manager_v1", {STAGING, "Single-pixel buffer", 
"single-pixel-buffer-v1"}},
+    {"wp_content_type_manager_v1", {STAGING, "Content type hint", 
"content-type-v1"}},
+    {"ext_idle_notifier_v1", {STAGING, "Idle notify", "ext-idle-notify-v1"}},
+    {"wp_tearing_control_manager_v1", {STAGING, "Tearing control", 
"tearing-control-v1"}},
+    {"xwayland_shell_v1", {STAGING, "Xwayland shell", "xwayland-shell-v1"}},
+    {"wp_fractional_scale_manager_v1", {STAGING, "Fractional scale", 
"fractional-scale-v1"}},
+    {"wp_cursor_shape_manager_v1", {STAGING, "Cursor shape", 
"cursor-shape-v1"}},
+    {"ext_foreign_toplevel_list_v1", {STAGING, "Foreign toplevel list", 
"ext-foreign-toplevel-list-v1"}},
+    {"wp_security_context_manager_v1", {STAGING, "Security context", 
"security-context-v1"}},
+
+    {"zwp_fullscreen_shell_v1", {UNSTABLE, "Fullscreen shell", 
"fullscreen-shell-unstable-v1"}},
+    {"zwp_idle_inhibit_manager_v1", {UNSTABLE, "Idle inhibit", 
"idle-inhibit-unstable-v1"}},
+    {"zwp_input_method_context_v1", {UNSTABLE, "Input method", 
"input-method-unstable-v1"}},
+    {"zwp_input_timestamps_manager_v1", {UNSTABLE, "Input timestamps", 
"input-timestamps-unstable-v1"}},
+    {"zwp_keyboard_shortcuts_inhibit_manager_v1", {UNSTABLE, "Keyboard 
shortcuts inhibit", "keyboard-shortcuts-inhibit-unstable-v1"}},
+    {"zwp_linux_dmabuf_v1", {UNSTABLE, "Linux DMA-BUF", 
"linux-dmabuf-unstable-v1"}},
+    {"zwp_linux_explicit_synchronization_v1", {UNSTABLE, "Linux explicit 
synchronization", "linux-explicit-synchronization-unstable-v1"}},
+    {"zwp_pointer_constraints_v1", {UNSTABLE, "Pointer constraints", 
"pointer-constraints-unstable-v1"}},
+    {"zwp_pointer_gestures_v1", {UNSTABLE, "Pointer gestures", 
"pointer-gestures-unstable-v1"}},
+    {"zwp_primary_selection_device_manager_v1", {UNSTABLE, "Primary 
selection", "primary-selection-unstable-v1"}},
+    {"zwp_relative_pointer_manager_v1", {UNSTABLE, "Relative pointer", 
"relative-pointer-unstable-v1"}},
+    {"zwp_tablet_manager_v2", {UNSTABLE, "Tablet", "tablet-unstable-v2"}},
+    {"zwp_text_input_v3", {UNSTABLE, "Text input", "text-input-unstable-v3"}},
+    {"zxdg_decoration_manager_v1", {UNSTABLE, "XDG decoration", 
"xdg-decoration-unstable-v1"}},
+    {"zxdg_exporter_v2", {UNSTABLE, "XDG foreign", "xdg-foreign-unstable-v2"}},
+    {"zxdg_output_manager_v1", {UNSTABLE, "XDG output", 
"xdg-output-unstable-v1"}},
+    {"zwp_xwayland_keyboard_grab_manager_v1", {UNSTABLE, "Xwayland keyboard 
grabbing", "xwayland-keyboard-grab-unstable-v1"}},
+
+    {"zwlr_data_control_manager_v1", {WLROOTS, "Data control", 
"wlr-data-control-unstable-v1"}},
+    {"zwlr_export_dmabuf_manager_v1", {WLROOTS, "Export DMA-BUF", 
"wlr-export-dmabuf-unstable-v1"}},
+    {"zwlr_foreign_toplevel_manager_v1", {WLROOTS, "Foreign toplevel 
management", "wlr-foreign-toplevel-management-unstable-v1"}},
+    {"zwlr_gamma_control_manager_v1", {WLROOTS, "Gamma control", 
"wlr-gamma-control-unstable-v1"}},
+    {"zwlr_input_inhibit_manager_v1", {WLROOTS, "Input inhibitor", 
"wlr-input-inhibitor-unstable-v1"}},
+    {"zwlr_layer_shell_v1", {WLROOTS, "Layer shell", 
"wlr-layer-shell-unstable-v1"}},
+    {"zwlr_output_manager_v1", {WLROOTS, "Output management", 
"wlr-output-management-unstable-v1"}},
+    {"zwlr_output_power_manager_v1", {WLROOTS, "Output power management", 
"wlr-output-power-management-unstable-v1"}},
+    {"zwlr_screencopy_manager_v1", {WLROOTS, "Screencopy", 
"wlr-screencopy-unstable-v1"}},
+    {"zwlr_virtual_pointer_v1", {WLROOTS, "Virtual pointer", 
"wlr-virtual-pointer-unstable-v1"}},
+
+    {"org_kde_kwin_appmenu_manager", {KDE, "AppMenu", "appmenu"}},
+    {"org_kde_kwin_blur_manager", {KDE, "Blur", "blur"}},
+    {"org_kde_kwin_contrast_manager", {KDE, "Contrast", "contrast"}},
+    {"org_kde_kwin_dpms_manager", {KDE, "DPMS", "dpms"}},
+    {"org_kde_kwin_fake_input", {KDE, "Fake input", "fake-input"}},
+    {"org_kde_kwin_idle", {KDE, "Idle", "idle"}},
+    {"org_kde_kwin_keystate", {KDE, "Key state", "keystate"}},
+    {"kde_lockscreen_overlay_v1", {KDE, "Lockscreen overlay", 
"kde-lockscreen-overlay-v1"}},
+    {"org_kde_kwin_outputmanagement", {KDE, "Output management", 
"output-management"}},
+    {"kde_output_management_v2", {KDE, "Output management v2", 
"kde-output-management-v2"}},
+    {"org_kde_kwin_outputdevice", {KDE, "Output device", "outputdevice"}},
+    {"kde_output_device_v2", {KDE, "Output device v2", 
"kde-output-device-v2"}},
+    {"kde_output_order_v1", {KDE, "Output order", "kde-output-order-v1"}},
+    {"org_kde_plasma_shell", {KDE, "Plasma shell", "plasma-shell"}},
+    {"org_kde_plasma_virtual_desktop_management", {KDE, "Plasma virtual 
desktop", "plasma-virtual-desktop"}},
+    {"org_kde_plasma_window_management", {KDE, "Plasma window management", 
"plasma-window-management"}},
+    {"kde_primary_output_v1", {KDE, "Primary output", 
"kde-primary-output-v1"}},
+    {"zkde_screencast_unstable_v1", {KDE, "Screencast", 
"zkde-screencast-unstable-v1"}},
+    {"org_kde_kwin_server_decoration_manager", {KDE, "Server decoration", 
"server-decoration"}},
+    {"org_kde_kwin_server_decoration_palette_manager", {KDE, "Server 
decoration palette", "server-decoration-palette"}},
+    {"org_kde_kwin_shadow_manager", {KDE, "Shadow", "shadow"}},
+    {"org_kde_kwin_slide_manager", {KDE, "Slide", "slide"}},
+
+    {"ivi_application", {WESTON, "In-vehicle infotainment application", 
"ivi-application"}},
+    {"ivi_hmi_controller", {WESTON, "In-vehicle infotainment HMI controller", 
"ivi-hmi-controller"}},
+    {"text_cursor_position", {WESTON, "Text cursor position", 
"text-cursor-position"}},
+    {"weston_content_protection", {WESTON, "Content protection", 
"weston-content-protection"}},
+    {"weston_desktop_shell", {WESTON, "Desktop shell", 
"weston-desktop-shell"}},
+    {"weston_direct_display_v1", {WESTON, "Direct display", 
"weston-direct-display"}},
+    {"weston_capture_v1", {WESTON, "Output capture", "weston-output-capture"}},
+    {"weston_screenshooter", {WESTON, "Screenshooter", 
"weston-screenshooter"}},
+    {"weston_touch_calibration", {WESTON, "Touch calibration", 
"weston-touch-calibration"}},
+};
+// clang-format on
+
+std::string status_to_string(ProtocolStatus status);
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/waycheck-v0.1.3/src/window.cpp 
new/waycheck-v0.2.0/src/window.cpp
--- old/waycheck-v0.1.3/src/window.cpp  2023-09-26 01:39:33.000000000 +0200
+++ new/waycheck-v0.2.0/src/window.cpp  2023-09-28 17:40:53.000000000 +0200
@@ -1,80 +1,17 @@
 #include "window.hpp"
 
+#include "protocols.hpp"
 #include "ui_window.h"
 
+#include <QAbstractItemView>
 #include <QCheckBox>
 #include <QGuiApplication>
-#include <QStandardItemModel>
 #include <fstream>
 #include <sys/socket.h>
+#include <unistd.h>
 #include <wayland-client-protocol.h>
 #include <wayland-client.h>
 
-static std::string status_to_string(ProtocolStatus status) {
-    switch (status) {
-        case STABLE:
-            return "Stable";
-        case STAGING:
-            return "Staging";
-        case UNSTABLE:
-            return "Unstable";
-        case WLROOTS:
-            return "Wlroots";
-        default:
-            return "Unknown";
-    }
-}
-
-// clang-format off
-static std::unordered_map<std::string, const Protocol> known_protocols = {
-    {"wp_presentation", {STABLE, "Presentation time", "presentation-time"}},
-    {"wp_viewporter", {STABLE, "Viewporter", "viewporter"}},
-    {"xdg_wm_base", {STABLE, "XDG shell", "xdg-shell"}},
-
-    {"xdg_activation_v1", {STAGING, "XDG activation", "xdg-activation-v1"}},
-    {"wp_drm_lease_v1", {STAGING, "DRM lease", "drm-lease-v1"}},
-    {"ext_session_lock_manager_v1", {STAGING, "Session lock", 
"ext-session-lock-v1"}},
-    {"wp_single_pixel_buffer_manager_v1", {STAGING, "Single-pixel buffer", 
"single-pixel-buffer-v1"}},
-    {"wp_content_type_manager_v1", {STAGING, "Content type hint", 
"content-type-v1"}},
-    {"ext_idle_notifier_v1", {STAGING, "Idle notify", "ext-idle-notify-v1"}},
-    {"wp_tearing_control_manager_v1", {STAGING, "Tearing control", 
"tearing-control-v1"}},
-    {"xwayland_shell_v1", {STAGING, "Xwayland shell", "xwayland-shell-v1"}},
-    {"wp_fractional_scale_manager_v1", {STAGING, "Fractional scale", 
"fractional-scale-v1"}},
-    {"wp_cursor_shape_manager_v1", {STAGING, "Cursor shape", 
"cursor-shape-v1"}},
-    {"ext_foreign_toplevel_list_v1", {STAGING, "Foreign toplevel list", 
"ext-foreign-toplevel-list-v1"}},
-    {"wp_security_context_manager_v1", {STAGING, "Security context", 
"security-context-v1"}},
-
-    {"zwp_fullscreen_shell_v1", {UNSTABLE, "Fullscreen shell", 
"fullscreen-shell-unstable-v1"}},
-    {"zwp_idle_inhibit_manager_v1", {UNSTABLE, "Idle inhibit", 
"idle-inhibit-unstable-v1"}},
-    {"zwp_input_method_context_v1", {UNSTABLE, "Input method", 
"input-method-unstable-v1"}},
-    {"zwp_input_timestamps_manager_v1", {UNSTABLE, "Input timestamps", 
"input-timestamps-unstable-v1"}},
-    {"zwp_keyboard_shortcuts_inhibit_manager_v1", {UNSTABLE, "Keyboard 
shortcuts inhibit", "keyboard-shortcuts-inhibit-unstable-v1"}},
-    {"zwp_linux_dmabuf_v1", {UNSTABLE, "Linux DMA-BUF", 
"linux-dmabuf-unstable-v1"}},
-    {"zwp_linux_explicit_synchronization_v1", {UNSTABLE, "Linux explicit 
synchronization", "linux-explicit-synchronization-unstable-v1"}},
-    {"zwp_pointer_constraints_v1", {UNSTABLE, "Pointer constraints", 
"pointer-constraints-unstable-v1"}},
-    {"zwp_pointer_gestures_v1", {UNSTABLE, "Pointer gestures", 
"pointer-gestures-unstable-v1"}},
-    {"zwp_primary_selection_device_manager_v1", {UNSTABLE, "Primary 
selection", "primary-selection-unstable-v1"}},
-    {"zwp_relative_pointer_manager_v1", {UNSTABLE, "Relative pointer", 
"relative-pointer-unstable-v1"}},
-    {"zwp_tablet_manager_v2", {UNSTABLE, "Tablet", "tablet-unstable-v2"}},
-    {"zwp_text_input_v3", {UNSTABLE, "Text input", "text-input-unstable-v3"}},
-    {"zxdg_decoration_manager_v1", {UNSTABLE, "XDG decoration", 
"xdg-decoration-unstable-v1"}},
-    {"zxdg_exporter_v2", {UNSTABLE, "XDG foreign", "xdg-foreign-unstable-v2"}},
-    {"zxdg_output_manager_v1", {UNSTABLE, "XDG output", 
"xdg-output-unstable-v1"}},
-    {"zwp_xwayland_keyboard_grab_manager_v1", {UNSTABLE, "Xwayland keyboard 
grabbing", "xwayland-keyboard-grab-unstable-v1"}},
-
-    {"zwlr_data_control_manager_v1", {WLROOTS, "Data control", 
"wlr-data-control-unstable-v1"}},
-    {"zwlr_export_dmabuf_manager_v1", {WLROOTS, "Export DMA-BUF", 
"wlr-export-dmabuf-unstable-v1"}},
-    {"zwlr_foreign_toplevel_manager_v1", {WLROOTS, "Foreign toplevel 
management", "wlr-foreign-toplevel-management-unstable-v1"}},
-    {"zwlr_gamma_control_manager_v1", {WLROOTS, "Gamma control", 
"wlr-gamma-control-unstable-v1"}},
-    {"zwlr_input_inhibit_manager_v1", {WLROOTS, "Input inhibitor", 
"wlr-input-inhibitor-unstable-v1"}},
-    {"zwlr_layer_shell_v1", {WLROOTS, "Layer shell", 
"wlr-layer-shell-unstable-v1"}},
-    {"zwlr_output_manager_v1", {WLROOTS, "Output management", 
"wlr-output-management-unstable-v1"}},
-    {"zwlr_output_power_manager_v1", {WLROOTS, "Output power management", 
"wlr-output-power-management-unstable-v1"}},
-    {"zwlr_screencopy_manager_v1", {WLROOTS, "Screencopy", 
"wlr-screencopy-unstable-v1"}},
-    {"zwlr_virtual_pointer_v1", {WLROOTS, "Virtual pointer", 
"wlr-virtual-pointer-unstable-v1"}},
-};
-// clang-format on
-
 static pid_t pid_from_fd(int fd) {
     struct ucred ucred;
     socklen_t len = sizeof(struct ucred);
@@ -94,6 +31,9 @@
         std::getline(infile, out);
         infile.close();
         return out;
+    } else if (getenv("container") != nullptr) {
+        // running in a flatpak, most likely
+        return "Unknown (Sandboxed)";
     } else {
         return "Unknown";
     }
@@ -118,23 +58,23 @@
 }
 
 Window::Window(QNativeInterface::QWaylandApplication* waylandApp, QWidget* 
parent)
-    : QMainWindow(parent), model(QStandardItemModel(0, 4)), ui(new Ui::Window) 
{
+    : QMainWindow(parent), upstreamModel(0, 4), wlrootsModel(0, 3), 
kdeModel(0, 3), westonModel(0, 3),
+      ui(std::make_unique<Ui::Window>()) {
     ui->setupUi(this);
 
-    model.setHorizontalHeaderLabels({"Status", "Name", "Identifier", 
"Implementation"});
-
-    ui->tableView->setModel(&model);
-    ui->tableView->setSortingEnabled(true);
-    ui->tableView->horizontalHeader()->setSectionResizeMode(1, 
QHeaderView::ResizeToContents);
-    ui->tableView->horizontalHeader()->setSectionResizeMode(2, 
QHeaderView::Stretch);
-    ui->tableView->horizontalHeader()->setSectionResizeMode(3, 
QHeaderView::ResizeToContents);
-    ui->tableView->horizontalHeader()->setSectionResizeMode(4, 
QHeaderView::ResizeToContents);
+    initTable(upstreamModel, *ui->upstreamTable);
+    initTable(wlrootsModel, *ui->wlrootsTable, false);
+    initTable(kdeModel, *ui->kdeTable, false);
+    initTable(westonModel, *ui->westonTable, false);
 
     for (auto protocol : known_protocols) {
         addProtocol(protocol.second);
     }
 
-    ui->tableView->sortByColumn(0, Qt::AscendingOrder);
+    ui->upstreamTable->sortByColumn(1, Qt::AscendingOrder);
+    for (auto* table : {ui->upstreamTable, ui->wlrootsTable, ui->kdeTable, 
ui->westonTable}) {
+        table->sortByColumn(0, Qt::AscendingOrder);
+    }
 
     auto* display = waylandApp->display();
     auto fd = wl_display_get_fd(display);
@@ -149,51 +89,121 @@
     wl_display_roundtrip(display);
 }
 
-Window::~Window() {
-    delete ui;
-}
+Window::~Window() = default;
 
 void Window::newGlobal(const std::string interface, const uint32_t version) {
     const Protocol& protocol = known_protocols[interface];
+    if (protocol.status == UNKNOWN) {
+        return;
+    }
 
-    if (protocol.status != UNKNOWN) {
-        auto matches = model.findItems(QString::fromStdString(protocol.name), 
Qt::MatchExactly, 2);
+    auto* model = modelForStatus(protocol.status);
+    if (model == nullptr) {
+        return;
+    }
 
-        for (auto match : matches) {
-            auto versionItem = model.item(match->row(), 3);
-            versionItem->setCheckState(Qt::Checked);
-            versionItem->setText(QString::asprintf("%d", version));
-
-            for (auto i = 0; i < model.columnCount(); i++) {
-                auto item = model.item(match->row(), i);
-                auto bg = item->background();
-                bg.setStyle(Qt::NoBrush);
-                item->setBackground(bg);
-            }
+    auto column = (model == &upstreamModel) ? 2 : 1;
+    auto matches = model->findItems(QString::fromStdString(protocol.name), 
Qt::MatchExactly, column);
+
+    for (auto match : matches) {
+        auto versionItem = model->item(match->row(), column + 1);
+        versionItem->setCheckState(Qt::Checked);
+        versionItem->setText(QString::asprintf("%d", version));
+
+        for (auto i = 0; i < model->columnCount(); i++) {
+            auto item = model->item(match->row(), i);
+            auto font = item->font();
+            font.setWeight(QFont::DemiBold);
+            item->setFont(font);
+            item->setData(true, Qt::UserRole);
         }
     }
 }
 
 void Window::addProtocol(const Protocol& protocol) {
-    auto statusItem = new 
QStandardItem(QString::fromStdString(status_to_string(protocol.status)));
-    statusItem->setTextAlignment(Qt::AlignCenter);
+    auto* model = modelForStatus(protocol.status);
+    if (model == nullptr) {
+        return;
+    }
 
     auto versionItem = new QStandardItem(false);
     versionItem->setCheckState(Qt::Unchecked);
     versionItem->setText("N/A");
 
     auto items = QList<QStandardItem*>({
-        statusItem,
         new QStandardItem(QString::fromStdString(protocol.pretty)),
         new QStandardItem(QString::fromStdString(protocol.name)),
         versionItem,
     });
+    if (protocol.status <= UNSTABLE) {
+        auto* statusItem = new 
QStandardItem(QString::fromStdString(status_to_string(protocol.status)));
+        statusItem->setTextAlignment(Qt::AlignCenter);
+        items.prepend(statusItem);
+    }
+
+    for (auto item : std::as_const(items)) {
+        item->setData(false, Qt::UserRole);
+    }
+
+    model->appendRow(items);
+}
 
-    for (auto item : items) {
-        auto bg = item->background();
-        bg.setStyle(Qt::Dense4Pattern);
-        item->setBackground(bg);
+void Window::initTable(QStandardItemModel& model, QTableView& table, bool 
includeStatus) {
+    table.setModel(&model);
+    table.setSortingEnabled(true);
+
+    if (includeStatus) {
+        model.setHorizontalHeaderLabels({"Status", "Name", "Identifier", 
"Implementation"});
+        table.horizontalHeader()->setSectionResizeMode(1, 
QHeaderView::ResizeToContents);
+        table.horizontalHeader()->setSectionResizeMode(2, 
QHeaderView::Stretch);
+        table.horizontalHeader()->setSectionResizeMode(3, 
QHeaderView::ResizeToContents);
+        table.horizontalHeader()->setSectionResizeMode(4, 
QHeaderView::ResizeToContents);
+    } else {
+        model.setHorizontalHeaderLabels({"Name", "Identifier", 
"Implementation"});
+        table.horizontalHeader()->setSectionResizeMode(0, 
QHeaderView::ResizeToContents);
+        table.horizontalHeader()->setSectionResizeMode(1, 
QHeaderView::Stretch);
+        table.horizontalHeader()->setSectionResizeMode(2, 
QHeaderView::ResizeToContents);
+    }
+    table.sortByColumn(0, Qt::AscendingOrder);
+
+    table.setEditTriggers(QAbstractItemView::NoEditTriggers);
+    table.setSelectionMode(QAbstractItemView::SingleSelection);
+    table.verticalHeader()->setVisible(false);
+    table.setItemDelegate(new TableItemDelegate);
+}
+
+QStandardItemModel* Window::modelForStatus(const ProtocolStatus status) {
+    switch (status) {
+        case STABLE:
+        case STAGING:
+        case UNSTABLE:
+            return &upstreamModel;
+        case WLROOTS:
+            return &wlrootsModel;
+        case KDE:
+            return &kdeModel;
+        case WESTON:
+            return &westonModel;
+        default:
+            return nullptr;
     }
+}
+
+TableItemDelegate::TableItemDelegate(QObject* parent) : 
QStyledItemDelegate(parent) {}
 
-    model.appendRow(items);
+void TableItemDelegate::paint(QPainter* painter, const QStyleOptionViewItem& 
option, const QModelIndex& index) const {
+    bool enabled = index.data(Qt::UserRole).toBool();
+
+    if (!enabled) {
+        QStyleOptionViewItem newOption(option);
+        initStyleOption(&newOption, index);
+
+        QColor textColor = newOption.palette.text().color();
+        textColor.setAlphaF(0.6);
+        newOption.palette.setColor(QPalette::Text, textColor);
+
+        QStyledItemDelegate::paint(painter, newOption, index);
+    } else {
+        QStyledItemDelegate::paint(painter, option, index);
+    }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/waycheck-v0.1.3/src/window.hpp 
new/waycheck-v0.2.0/src/window.hpp
--- old/waycheck-v0.1.3/src/window.hpp  2023-09-26 01:39:33.000000000 +0200
+++ new/waycheck-v0.2.0/src/window.hpp  2023-09-28 17:40:53.000000000 +0200
@@ -1,9 +1,15 @@
 #ifndef WINDOW_HPP
 #define WINDOW_HPP
 
+#include "protocols.hpp"
+
 #include <QGuiApplication>
 #include <QMainWindow>
 #include <QStandardItemModel>
+#include <QStyledItemDelegate>
+#include <QTableView>
+
+#include <memory>
 
 QT_BEGIN_NAMESPACE
 namespace Ui {
@@ -11,23 +17,12 @@
 }
 QT_END_NAMESPACE
 
-enum ProtocolStatus {
-    UNKNOWN,
-    STABLE,
-    STAGING,
-    UNSTABLE,
-    WLROOTS,
-};
-
-struct Protocol {
-    ProtocolStatus status;
-    std::string pretty;
-    std::string name;
-};
-
 class Window : public QMainWindow {
     Q_OBJECT
-    QStandardItemModel model;
+    QStandardItemModel upstreamModel;
+    QStandardItemModel wlrootsModel;
+    QStandardItemModel kdeModel;
+    QStandardItemModel westonModel;
 
   public:
     Window(QNativeInterface::QWaylandApplication* waylandApp, QWidget* parent 
= nullptr);
@@ -38,6 +33,19 @@
     void addProtocol(const Protocol& protocol);
 
   private:
-    Ui::Window* ui;
+    void initTable(QStandardItemModel& model, QTableView& table, bool 
includeStatus = true);
+
+    QStandardItemModel* modelForStatus(const ProtocolStatus status);
+
+  private:
+    std::unique_ptr<Ui::Window> const ui;
 };
+
+class TableItemDelegate : public QStyledItemDelegate {
+  public:
+    TableItemDelegate(QObject* parent = nullptr);
+
+    void paint(QPainter* painter, const QStyleOptionViewItem& option, const 
QModelIndex& index) const override;
+};
+
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/waycheck-v0.1.3/src/window.ui 
new/waycheck-v0.2.0/src/window.ui
--- old/waycheck-v0.1.3/src/window.ui   2023-09-26 01:39:33.000000000 +0200
+++ new/waycheck-v0.2.0/src/window.ui   2023-09-28 17:40:53.000000000 +0200
@@ -19,16 +19,16 @@
      <number>8</number>
     </property>
     <property name="leftMargin">
-     <number>16</number>
+     <number>8</number>
     </property>
     <property name="topMargin">
-     <number>16</number>
+     <number>8</number>
     </property>
     <property name="rightMargin">
-     <number>16</number>
+     <number>8</number>
     </property>
     <property name="bottomMargin">
-     <number>16</number>
+     <number>8</number>
     </property>
     <item>
      <widget class="QLabel" name="compositor">
@@ -37,6 +37,9 @@
         <pointsize>16</pointsize>
        </font>
       </property>
+      <property name="bottomMargin">
+       <number>4</number>
+      </property>
       <property name="text">
        <string>TextLabel</string>
       </property>
@@ -46,13 +49,74 @@
      </widget>
     </item>
     <item>
-     <widget class="QTableView" name="tableView">
-     <property name="sizePolicy">
-     <sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
-     <horstretch>0</horstretch>
-     <verstretch>0</verstretch>
-     </sizepolicy>
-     </property>
+     <widget class="QTabWidget" name="toolBox">
+      <property name="currentIndex">
+       <number>0</number>
+      </property>
+      <widget class="QWidget" name="upstreamTool">
+       <property name="geometry">
+        <rect>
+         <x>0</x>
+         <y>0</y>
+        </rect>
+       </property>
+       <attribute name="title">
+        <string>Upstream</string>
+       </attribute>
+       <layout class="QVBoxLayout" name="verticalLayout_1">
+        <item>
+<widget class="QTableView" name="upstreamTable"/>
+        </item>
+       </layout>
+      </widget>
+      <widget class="QWidget" name="wlrootsTool">
+       <property name="geometry">
+        <rect>
+         <x>0</x>
+         <y>0</y>
+        </rect>
+       </property>
+       <attribute name="title">
+        <string>Wlroots</string>
+       </attribute>
+       <layout class="QVBoxLayout" name="verticalLayout_2">
+        <item row="0" column="0">
+         <widget class="QTableView" name="wlrootsTable"/>
+        </item>
+       </layout>
+      </widget>
+      <widget class="QWidget" name="kdeTool">
+       <property name="geometry">
+        <rect>
+         <x>0</x>
+         <y>0</y>
+        </rect>
+       </property>
+       <attribute name="title">
+        <string>KDE</string>
+       </attribute>
+       <layout class="QVBoxLayout" name="verticalLayout_3">
+        <item>
+         <widget class="QTableView" name="kdeTable"/>
+        </item>
+       </layout>
+      </widget>
+      <widget class="QWidget" name="westonTool">
+       <property name="geometry">
+        <rect>
+         <x>0</x>
+         <y>0</y>
+        </rect>
+       </property>
+       <attribute name="title">
+        <string>Weston</string>
+       </attribute>
+       <layout class="QVBoxLayout" name="verticalLayout_4">
+        <item>
+         <widget class="QTableView" name="westonTable"/>
+        </item>
+       </layout>
+      </widget>
      </widget>
     </item>
    </layout>

Reply via email to