Move implementation of wantsTabFocus to AbstractClient

This commit is contained in:
Martin Gräßlin 2015-03-13 10:31:35 +01:00
parent 1fcd1120d9
commit 4b27abd76b
4 changed files with 7 additions and 7 deletions

View file

@ -214,4 +214,9 @@ void AbstractClient::autoRaise()
cancelAutoRaise();
}
bool AbstractClient::wantsTabFocus() const
{
return (isNormalWindow() || isDialog()) && wantsInput();
}
}

View file

@ -109,13 +109,14 @@ public:
void cancelAutoRaise();
bool wantsTabFocus() const;
virtual void updateMouseGrab();
virtual QString caption(bool full = true, bool stripped = false) const = 0;
virtual bool isMinimized() const = 0;
virtual bool isCloseable() const = 0;
// TODO: remove boolean trap
virtual bool isShown(bool shaded_is_shown) const = 0;
virtual bool wantsTabFocus() const = 0;
virtual bool isFullScreen() const = 0;
// TODO: remove boolean trap
virtual AbstractClient *findModal(bool allow_itself = false) = 0;

View file

@ -1962,11 +1962,6 @@ void Client::sendSyncRequest()
syncRequest.lastTimestamp = xTime();
}
bool Client::wantsTabFocus() const
{
return (isNormalWindow() || isDialog()) && wantsInput();
}
bool Client::wantsInput() const
{
return rules()->checkAcceptFocus(info->input() || info->supportsProtocol(NET::TakeFocusProtocol));

View file

@ -387,7 +387,6 @@ public:
bool isModal() const;
// Auxiliary functions, depend on the windowType
bool wantsTabFocus() const override;
bool wantsInput() const override;
bool isResizable() const override;