activation: Guard against not having any active window
If we have no active window we shouldn't call lastUsageSerial. We may as well activate whatever client requested it.
This commit is contained in:
parent
18553417d3
commit
319c6a4cfa
1 changed files with 1 additions and 1 deletions
|
@ -128,7 +128,7 @@ void XdgActivationV1Integration::activateSurface(SurfaceInterface *surface, cons
|
||||||
|
|
||||||
auto ownerWindow = waylandServer()->findWindow(m_currentActivationToken->surface);
|
auto ownerWindow = waylandServer()->findWindow(m_currentActivationToken->surface);
|
||||||
qCDebug(KWIN_CORE) << "activating" << window << surface << "on behalf of" << m_currentActivationToken->surface << "into" << ownerWindow;
|
qCDebug(KWIN_CORE) << "activating" << window << surface << "on behalf of" << m_currentActivationToken->surface << "into" << ownerWindow;
|
||||||
if (ws->activeWindow() == ownerWindow || ws->activeWindow()->lastUsageSerial() < m_currentActivationToken->serial || m_currentActivationToken->isPrivileged) {
|
if (!ws->activeWindow() || ws->activeWindow() == ownerWindow || ws->activeWindow()->lastUsageSerial() < m_currentActivationToken->serial || m_currentActivationToken->isPrivileged) {
|
||||||
ws->activateWindow(window);
|
ws->activateWindow(window);
|
||||||
} else {
|
} else {
|
||||||
qCWarning(KWIN_CORE) << "Activation requested while owner isn't active" << (ownerWindow ? ownerWindow->desktopFileName() : "null")
|
qCWarning(KWIN_CORE) << "Activation requested while owner isn't active" << (ownerWindow ? ownerWindow->desktopFileName() : "null")
|
||||||
|
|
Loading…
Reference in a new issue