From e3ae38991c318df2b250884bc3f530a2bed6b88d Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Sat, 25 May 2024 09:05:04 +0300 Subject: [PATCH] kwin: write and read "demands attentions" state of clients from/to session config this is only the part related to the session config, currently the state is not restored Signed-off-by: Ivailo Monev --- kwin/kcmkwin/kwinoptions/windows.h | 20 ++++++-------------- kwin/sm.cpp | 2 ++ kwin/sm.h | 2 +- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/kwin/kcmkwin/kwinoptions/windows.h b/kwin/kcmkwin/kwinoptions/windows.h index bd84fd10..e5c6f322 100644 --- a/kwin/kcmkwin/kwinoptions/windows.h +++ b/kwin/kcmkwin/kwinoptions/windows.h @@ -23,6 +23,12 @@ #define KKWMWINDOWS_H #include +#include +#include +#include +#include +#include +#include #include #include @@ -30,20 +36,6 @@ #include "ui_focus.h" #include "ui_moving.h" -#include -#include -#include -class KComboBox; -#include -#include -#include -class KButtonGroup; -// #include - -class KColorButton; -class KIntNumInput; - - class KWinFocusConfigForm : public QWidget, public Ui::KWinFocusConfigForm { Q_OBJECT diff --git a/kwin/sm.cpp b/kwin/sm.cpp index e0637261..28466c20 100644 --- a/kwin/sm.cpp +++ b/kwin/sm.cpp @@ -92,6 +92,7 @@ void Workspace::storeClient(KConfigGroup &cg, int num, Client *c) cg.writeEntry(QString("skipTaskbar") + n, c->skipTaskbar(true)); cg.writeEntry(QString("skipPager") + n, c->skipPager()); cg.writeEntry(QString("skipSwitcher") + n, c->skipSwitcher()); + cg.writeEntry(QString("demandAttention") + n, c->isDemandingAttention()); // not really just set by user, but name kept for back. comp. reasons cg.writeEntry(QString("userNoBorder") + n, c->noBorder()); cg.writeEntry(QString("windowType") + n, windowTypeToTxt(c->windowType())); @@ -137,6 +138,7 @@ void Workspace::loadSessionInfo() info->skipTaskbar = cg.readEntry(QString("skipTaskbar") + n, false); info->skipPager = cg.readEntry(QString("skipPager") + n, false); info->skipSwitcher = cg.readEntry(QString("skipSwitcher") + n, false); + info->demandAttention = cg.readEntry(QString("demandAttention") + n, false); info->noBorder = cg.readEntry(QString("userNoBorder") + n, false); info->windowType = txtToWindowType(cg.readEntry(QString("windowType") + n, QString()).toLatin1()); info->shortcut = cg.readEntry(QString("shortcut") + n, QString()); diff --git a/kwin/sm.h b/kwin/sm.h index d01f1062..c0050ea9 100644 --- a/kwin/sm.h +++ b/kwin/sm.h @@ -54,6 +54,7 @@ struct SessionInfo { bool skipTaskbar; bool skipPager; bool skipSwitcher; + bool demandAttention; bool noBorder; NET::WindowType windowType; QString shortcut; @@ -61,7 +62,6 @@ struct SessionInfo { int stackingOrder; float opacity; int tabGroup; // Unique identifier for the client group that this window is in - Client* tabGroupClient; // The first client created that has an identical identifier };