Workspace::activateClient and ::requestFocus changed to AbstractClient
requestFocus delegates to takeActivity which is not yet adjusted but performs a nullptr check, thus we pass a casted Client.
This commit is contained in:
parent
8cfe0a9316
commit
484f9b6e65
4 changed files with 11 additions and 7 deletions
|
@ -71,6 +71,7 @@ public:
|
|||
virtual void setOnAllDesktops(bool set) = 0;
|
||||
virtual void setDesktop(int) = 0;
|
||||
virtual void minimize(bool avoid_animation = false) = 0;
|
||||
virtual void unminimize(bool avoid_animation = false)= 0;
|
||||
virtual void setFullScreen(bool set, bool user = true) = 0;
|
||||
virtual bool keepAbove() const = 0;
|
||||
virtual void setKeepAbove(bool) = 0;
|
||||
|
|
|
@ -287,7 +287,7 @@ void Workspace::setActiveClient(Client* c)
|
|||
|
||||
\sa stActiveClient(), requestFocus()
|
||||
*/
|
||||
void Workspace::activateClient(Client* c, bool force)
|
||||
void Workspace::activateClient(AbstractClient* c, bool force)
|
||||
{
|
||||
if (c == NULL) {
|
||||
focusToNull();
|
||||
|
@ -322,7 +322,10 @@ void Workspace::activateClient(Client* c, bool force)
|
|||
// E.g. typing URL in minicli which will show kio_uiserver dialog (with workaround),
|
||||
// and then kdesktop shows dialog about SSL certificate.
|
||||
// This needs also avoiding user creation time in Client::readUserTimeMapTimestamp().
|
||||
c->updateUserTime();
|
||||
if (Client *client = dynamic_cast<Client*>(c)) {
|
||||
// updateUserTime is X11 specific
|
||||
client->updateUserTime();
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -332,9 +335,9 @@ void Workspace::activateClient(Client* c, bool force)
|
|||
|
||||
\sa Workspace::activateClient()
|
||||
*/
|
||||
void Workspace::requestFocus(Client* c, bool force)
|
||||
void Workspace::requestFocus(AbstractClient* c, bool force)
|
||||
{
|
||||
takeActivity(c, force ? ActivityFocusForce : ActivityFocus);
|
||||
takeActivity(dynamic_cast<Client*>(c), force ? ActivityFocusForce : ActivityFocus);
|
||||
}
|
||||
|
||||
void Workspace::takeActivity(Client* c, ActivityFlags flags)
|
||||
|
|
2
client.h
2
client.h
|
@ -538,7 +538,7 @@ public:
|
|||
|
||||
void setMinimized(bool set);
|
||||
void minimize(bool avoid_animation = false) override;
|
||||
void unminimize(bool avoid_animation = false);
|
||||
void unminimize(bool avoid_animation = false) override;
|
||||
void killWindow();
|
||||
void maximize(MaximizeMode) override;
|
||||
void toggleShade();
|
||||
|
|
|
@ -148,8 +148,8 @@ public:
|
|||
|
||||
Client* clientUnderMouse(int screen) const;
|
||||
|
||||
void activateClient(Client*, bool force = false);
|
||||
void requestFocus(Client* c, bool force = false);
|
||||
void activateClient(AbstractClient*, bool force = false);
|
||||
void requestFocus(AbstractClient* c, bool force = false);
|
||||
enum ActivityFlag {
|
||||
ActivityFocus = 1 << 0, // focus the window
|
||||
ActivityFocusForce = 1 << 1 | ActivityFocus, // focus even if Dock etc.
|
||||
|
|
Loading…
Reference in a new issue