Name: applet-window-buttons %global forgeurl https://github.com/ciolansteen/plasma-%{name}6 %global date 20260720 %global commit 08b396d9588f994163df8b8c779e324f60e1f243 %forgemeta %global applet_id org.kde.windowbuttons Version: 0.16.0 Release: 0%{?dist} Summary: Plasma 6 applet to show window buttons in panels License: GPL-2.0-or-later URL: %{forgeurl} Source: %{forgesource} BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: extra-cmake-modules BuildRequires: kf6-rpm-macros BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: cmake(Qt6DBus) BuildRequires: cmake(Qt6Gui) BuildRequires: cmake(Qt6Qml) BuildRequires: cmake(Qt6Quick) BuildRequires: cmake(Qt6Widgets) BuildRequires: cmake(KF6Config) BuildRequires: cmake(KF6ConfigWidgets) BuildRequires: cmake(KF6CoreAddons) BuildRequires: cmake(KF6Declarative) BuildRequires: cmake(KF6I18n) BuildRequires: cmake(KF6KCMUtils) BuildRequires: cmake(KF6Package) BuildRequires: cmake(KF6Service) BuildRequires: cmake(KF6Svg) BuildRequires: cmake(KF6WindowSystem) BuildRequires: cmake(KWinDBusInterface) BuildRequires: cmake(Plasma) BuildRequires: cmake(KDecoration3) Requires: plasma-workspace Provides: applet-window-buttons6 = %{version}-%{release} %description This fork makes the panel buttons target the maximized window on the current screen, because that is the window the panel visually represents. Focus is only used as a fallback when no maximized window exists. Changes: - Outside Always Visible and panel edit mode, controls are shown exactly when the represented window has KWin's HasNoBorder state. Toggling the native titlebar with Meta+B therefore updates the panel immediately for floating, tiled, and maximized windows, without duplicate controls. - Borderless targets are preferred in this order: active borderless, maximized borderless, then most recently activated/stacked borderless. This preserves the maximized-window target behind a focused titled helper while also supporting borderless floating and tiled windows. - Window button actions prefer the maximized window on the current screen. If a floating dialog or helper window is focused above a maximized window, the panel buttons still operate on the maximized window they visually represent. - If no maximized window exists on that screen, actions fall back to the active window, preserving the useful upstream behavior for normal/floating sessions. - The old "Active window is maximized" behavior is treated as a compatibility alias for the maximized-window behavior, because tying panel titlebar visibility to focus is misleading when floating windows overlap maximized windows. - A real MaximizedWindowExists visibility mode is added and exposed in the Behavior settings as "Maximized window is shown". - Maximized-window detection uses Plasma's TaskManager.TasksModel after its existing screen, virtual desktop, and activity filters. With "Show only for windows in current screen" enabled, visibility and actions are screen-local. - "Draw buttons inactive state when needed" is evaluated against the window represented by the panel buttons, not whichever floating window currently has focus. If the target window is inactive, the panel buttons use inactive decoration colors; when that target window is active, they use active colors. - If focus moves to a special window that is outside Plasma's task model, such as (eg: Yakuake or any other dialog), the represented window buttons become truly inactive and clicks do nothing. If focus moves to a normal floating window that Plasma tracks, the represented buttons stay usable but are dimmed to show that their target is not focused. - Button release and hover events are forwarded to KDecoration with corrected coordinates, avoiding stale pointer state caused by mismatched event geometry. - Synthetic Qt input events use Qt 6 constructors while keeping event->position() in KDecoration's local coordinate system and preserving the originating pointer device. - Decoration buttons are recreated when the represented target window changes, which keeps Breeze's internal maximize/restore checked state synchronized even when both the old and new targets are maximized. %prep %forgeautosetup -p1 %build %cmake_kf6 %cmake_build %install %cmake_install %check desktop-file-validate %{buildroot}%{_datadir}/plasma/plasmoids/%{applet_id}/metadata.desktop %files %license LICENSE %{_kf6_datadir}/plasma/plasmoids/%{applet_id} %{_qt6_qmldir}/org/kde/appletdecoration %changelog * Mon Sep 28 2026 Hazel Bunny - 0.16.0-0.git - Update to version 0.16.0 * Fri Oct 10 2025 Hazel Bunny - 0.14.0-2.git - Rebuild for Fedora 43 * Sun Apr 20 2025 Hazel Bunny - 0.14.0-1.git - Rebuild for Qt 6.9 * Fri Nov 1 2024 Hazel Bunny - 0.13.0-2.git - Rebuild for Qt 6.8 * Sun Apr 14 2024 Hazel Bunny - 0.13.0-1.git - Update to version 0.13.0 * Fri Mar 15 2024 Hazel Bunny - 0.12.0-1.git - Switch to a git snapshot to fix metadata.json * Fri Mar 8 2024 Hazel Bunny - 0.12.0-1 - Update to version 0.12.0 * Wed Feb 21 2024 Alessandro Astone - 0.11.1^20240221.3047ed7-1 - Switch to a fork compatible with Plasma 6 * Mon Jan 22 2024 Fedora Release Engineering - 0.11.1-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jan 19 2024 Fedora Release Engineering - 0.11.1-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Wed Jul 19 2023 Fedora Release Engineering - 0.11.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Tue Feb 21 2023 Marc Deop i Argemí - 0.11.1-6 - Cosmetic changes to the spec file. - Add patch from PR 191 locally. * Tue Jan 31 2023 Onuralp Sezer - 0.11.1-5 - Rebuilt for kde 5.26.90 library changes * Tue Jan 31 2023 Onuralp Sezer - 0.11.1-4 - Rebuilt for libkdecorations2private.so * Wed Jan 18 2023 Fedora Release Engineering - 0.11.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Wed Jul 20 2022 Fedora Release Engineering - 0.11.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Thu Mar 31 2022 Onuralp Sezer - 0.11.1-1 - Update to version 0.11.1 * Wed Jan 19 2022 Fedora Release Engineering - 0.10.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Tue Dec 7 2021 Onuralp Sezer - 0.10.1-1 - 0.10.1 * Tue Dec 7 2021 Onuralp Sezer - 0.9.0-5 - 00-fix-update-override.patch add into git source for fix build problem (#2024145) - cosmetic fixes * Wed Oct 13 2021 Onuralp Sezer - 0.9.0-4 - rawhide-fixing build attempt #1 - 00-fix-update-override.patch added. * Thu Jul 29 2021 Onuralp Sezer - 0.9.0-3 - BR : appstream added fix build errors * Wed Jul 21 2021 Fedora Release Engineering - 0.9.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Wed May 12 2021 Onuralp SEZER - 0.9.0-1 - initial package