Emit Workspace::windowAdded() at more intuitive time when starting to manage an X11 window
Emitting the Workspace::windowAdded() signal before actually adding the window to the Workspace is counter-intuitive and it can a source of potential bugs as relevant window lists in Workspace don't contain the window yet.
This commit is contained in:
parent
67181d5db7
commit
f1c9cb5d64
1 changed files with 1 additions and 3 deletions
|
@ -657,6 +657,7 @@ X11Window *Workspace::createX11Window(xcb_window_t windowId, bool is_mapped)
|
|||
return nullptr;
|
||||
}
|
||||
addX11Window(window);
|
||||
Q_EMIT windowAdded(window);
|
||||
return window;
|
||||
}
|
||||
|
||||
|
@ -680,9 +681,6 @@ Unmanaged *Workspace::createUnmanaged(xcb_window_t windowId)
|
|||
void Workspace::addX11Window(X11Window *window)
|
||||
{
|
||||
Group *grp = findGroup(window->window());
|
||||
|
||||
Q_EMIT windowAdded(window);
|
||||
|
||||
if (grp != nullptr) {
|
||||
grp->gotLeader(window);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue