From d24e8e9736287d01ee73ef9d573d2bc316a62d5c Mon Sep 17 00:00:00 2001 From: nemalex Date: Wed, 26 Nov 2025 13:51:58 +0100 Subject: [PATCH] hyprland/ipc: swap windowTitle and windowClass in openwindow handler The openwindow event format is ADDRESS,WORKSPACE,CLASS,TITLE but the handler was parsing args.at(2) as title and args.at(3) as class, which is reversed. This caused windows to display their class name instead of their actual title when the openwindow event arrived after windowtitlev2, since updateInitial would overwrite the correct title with the class. --- changelog/next.md | 1 + src/wayland/hyprland/ipc/connection.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/changelog/next.md b/changelog/next.md index 0d15e5e..a33db97 100644 --- a/changelog/next.md +++ b/changelog/next.md @@ -27,6 +27,7 @@ set shell id. - Fixed escape sequence handling in desktop entries. - Fixed volumes not initializing if a pipewire device was already loaded before its node. - Fixed hyprland active toplevel not resetting after window closes. +- Fixed hyprland ipc window names and titles being reversed. ## Packaging Changes diff --git a/src/wayland/hyprland/ipc/connection.cpp b/src/wayland/hyprland/ipc/connection.cpp index 234c299..ad091a6 100644 --- a/src/wayland/hyprland/ipc/connection.cpp +++ b/src/wayland/hyprland/ipc/connection.cpp @@ -442,8 +442,8 @@ void HyprlandIpc::onEvent(HyprlandIpcEvent* event) { if (!ok) return; auto workspaceName = QString::fromUtf8(args.at(1)); - auto windowTitle = QString::fromUtf8(args.at(2)); - auto windowClass = QString::fromUtf8(args.at(3)); + auto windowClass = QString::fromUtf8(args.at(2)); + auto windowTitle = QString::fromUtf8(args.at(3)); auto* workspace = this->findWorkspaceByName(workspaceName, false); if (!workspace) {