From a6a022f00f195b2ca59e02abe317344733960a77 Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Thu, 1 Dec 2022 02:15:26 +0100 Subject: [PATCH] Port away from deprecated KWindowSystem API --- src/group.cpp | 4 ++-- src/x11window.cpp | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/group.cpp b/src/group.cpp index b622318fa0..94cb9428eb 100644 --- a/src/group.cpp +++ b/src/group.cpp @@ -15,7 +15,7 @@ #include "workspace.h" #include "x11window.h" -#include +#include #include namespace KWin @@ -51,7 +51,7 @@ QIcon Group::icon() const QIcon ic; NETWinInfo info(kwinApp()->x11Connection(), leader_wid, kwinApp()->x11RootWindow(), NET::WMIcon, NET::WM2IconPixmap); auto readIcon = [&ic, &info, this](int size, bool scale = true) { - const QPixmap pix = KWindowSystem::icon(leader_wid, size, size, scale, KWindowSystem::NETWM | KWindowSystem::WMHints, &info); + const QPixmap pix = KX11Extras::icon(leader_wid, size, size, scale, KX11Extras::NETWM | KX11Extras::WMHints, &info); if (!pix.isNull()) { ic.addPixmap(pix); } diff --git a/src/x11window.cpp b/src/x11window.cpp index ec0fbee447..bf1524f174 100644 --- a/src/x11window.cpp +++ b/src/x11window.cpp @@ -38,7 +38,7 @@ // KDE #include #include -#include +#include // Qt #include #include @@ -2283,7 +2283,7 @@ void X11Window::getIcons() } QIcon icon; auto readIcon = [this, &icon](int size, bool scale = true) { - const QPixmap pix = KWindowSystem::icon(window(), size, size, scale, KWindowSystem::NETWM | KWindowSystem::WMHints, info); + const QPixmap pix = KX11Extras::icon(window(), size, size, scale, KX11Extras::NETWM | KX11Extras::WMHints, info); if (!pix.isNull()) { icon.addPixmap(pix); } @@ -2309,10 +2309,10 @@ void X11Window::getIcons() } if (icon.isNull()) { // And if nothing else, load icon from classhint or xapp icon - icon.addPixmap(KWindowSystem::icon(window(), 32, 32, true, KWindowSystem::ClassHint | KWindowSystem::XApp, info)); - icon.addPixmap(KWindowSystem::icon(window(), 16, 16, true, KWindowSystem::ClassHint | KWindowSystem::XApp, info)); - icon.addPixmap(KWindowSystem::icon(window(), 64, 64, false, KWindowSystem::ClassHint | KWindowSystem::XApp, info)); - icon.addPixmap(KWindowSystem::icon(window(), 128, 128, false, KWindowSystem::ClassHint | KWindowSystem::XApp, info)); + icon.addPixmap(KX11Extras::icon(window(), 32, 32, true, KX11Extras::ClassHint | KX11Extras::XApp, info)); + icon.addPixmap(KX11Extras::icon(window(), 16, 16, true, KX11Extras::ClassHint | KX11Extras::XApp, info)); + icon.addPixmap(KX11Extras::icon(window(), 64, 64, false, KX11Extras::ClassHint | KX11Extras::XApp, info)); + icon.addPixmap(KX11Extras::icon(window(), 128, 128, false, KX11Extras::ClassHint | KX11Extras::XApp, info)); } setIcon(icon); }