Introduce AbstractClient::doSetDemandsAttention()

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27119
This commit is contained in:
Vlad Zahorodnii 2020-02-03 01:23:47 +02:00
parent f90c65f431
commit a281bece6a
4 changed files with 12 additions and 3 deletions

View file

@ -407,13 +407,15 @@ void AbstractClient::demandAttention(bool set)
if (m_demandsAttention == set)
return;
m_demandsAttention = set;
if (info) {
info->setState(set ? NET::DemandsAttention : NET::States(), NET::DemandsAttention);
}
doSetDemandsAttention();
workspace()->clientAttentionChanged(this, set);
emit demandsAttentionChanged();
}
void AbstractClient::doSetDemandsAttention()
{
}
void AbstractClient::setDesktop(int desktop)
{
const int numberOfDesktops = VirtualDesktopManager::self()->count();

View file

@ -984,6 +984,7 @@ protected:
virtual void doSetSkipTaskbar();
virtual void doSetSkipPager();
virtual void doSetSkipSwitcher();
virtual void doSetDemandsAttention();
void setupWindowManagementInterface();
void destroyWindowManagementInterface();

View file

@ -1922,6 +1922,11 @@ void X11Client::doSetDesktop(int desktop, int was_desk)
updateVisibility();
}
void X11Client::doSetDemandsAttention()
{
info->setState(isDemandingAttention() ? NET::DemandsAttention : NET::States(), NET::DemandsAttention);
}
/**
* Sets whether the client is on @p activity.
* If you remove it from its last activity, then it's on all activities.

View file

@ -365,6 +365,7 @@ protected:
void doSetSkipPager() override;
void doSetSkipTaskbar() override;
void doSetSkipSwitcher() override;
void doSetDemandsAttention() override;
bool belongsToDesktop() const override;
void setGeometryRestore(const QRect &geo) override;
bool doStartMoveResize() override;