From e824e2a5c50692a48cb86ee90f711f5b0c87b7b2 Mon Sep 17 00:00:00 2001 From: Sylphera <233718609+Sylphera@users.noreply.github.com> Date: Thu, 19 Nov 2026 10:42:07 +0100 Subject: [PATCH] Let moc see the Hyprland types whole, as upstream does HyprlandWorkspace and HyprlandToplevel declare HyprlandMonitor* properties with the class only forward-declared. Depending on load order, QML then got monitors as opaque QVariants with no id or scale, and the overview's sizes turned into NaN: a polish loop that froze the dock, the bar's workspace animation and the region selector. Made with Claude Opus 5.5 (Anthropic). Files changed: src/windows/hyprland/connection.hpp --- src/windows/hyprland/connection.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/windows/hyprland/connection.hpp b/src/windows/hyprland/connection.hpp index 13fdb7338..84aab5f2a 100644 --- a/src/windows/hyprland/connection.hpp +++ b/src/windows/hyprland/connection.hpp @@ -30,6 +30,12 @@ class Dispatcher; } // namespace qs::hyprland::ipc +// Like upstream: moc must see these types whole, or a HyprlandMonitor* can +// reach QML as an opaque QVariant (no id, no scale) depending on load order. +Q_MOC_INCLUDE("hyprland_toplevel.hpp") +Q_MOC_INCLUDE("monitor.hpp") +Q_MOC_INCLUDE("workspace.hpp") + Q_DECLARE_OPAQUE_POINTER(qs::hyprland::ipc::HyprlandWorkspace*); Q_DECLARE_OPAQUE_POINTER(qs::hyprland::ipc::HyprlandMonitor*); Q_DECLARE_OPAQUE_POINTER(qs::hyprland::ipc::HyprlandToplevel*);