Port Workspace::requestDelayFocus to AbstractClient
And also call cancelDelayFocus when removing a ShellClient.
This commit is contained in:
parent
f0ec89f38b
commit
6b06779a64
2 changed files with 6 additions and 3 deletions
|
@ -399,6 +399,9 @@ void Workspace::init()
|
|||
connect(w, &WaylandServer::shellClientRemoved, this,
|
||||
[this] (ShellClient *c) {
|
||||
m_allClients.removeAll(c);
|
||||
if (c == delayfocus_client) {
|
||||
cancelDelayFocus();
|
||||
}
|
||||
clientHidden(c);
|
||||
emit clientRemoved(c);
|
||||
x_stacking_dirty = true;
|
||||
|
@ -1207,7 +1210,7 @@ void Workspace::delayFocus()
|
|||
cancelDelayFocus();
|
||||
}
|
||||
|
||||
void Workspace::requestDelayFocus(Client* c)
|
||||
void Workspace::requestDelayFocus(AbstractClient* c)
|
||||
{
|
||||
delayfocus_client = c;
|
||||
delete delayFocusTimer;
|
||||
|
|
|
@ -325,7 +325,7 @@ public:
|
|||
int packPositionDown(const AbstractClient* cl, int oldy, bool bottom_edge) const;
|
||||
|
||||
void cancelDelayFocus();
|
||||
void requestDelayFocus(Client*);
|
||||
void requestDelayFocus(AbstractClient*);
|
||||
|
||||
/**
|
||||
* updates the mouse position to track whether a focus follow mouse focus change was caused by
|
||||
|
@ -535,7 +535,7 @@ private:
|
|||
|
||||
// Delay(ed) window focus timer and client
|
||||
QTimer* delayFocusTimer;
|
||||
Client* delayfocus_client;
|
||||
AbstractClient* delayfocus_client;
|
||||
QPoint focusMousePos;
|
||||
|
||||
ClientList clients;
|
||||
|
|
Loading…
Reference in a new issue