Request activate on show

Unless the window doesn't have keyboard interactivity or the caller
wants it not to.

To match XDG Shell behavior and general Qt window behavior.
This commit is contained in:
Kai Uwe Broulik
2025-07-23 17:00:24 +02:00
parent f599e829ad
commit d436a779d7
4 changed files with 42 additions and 0 deletions

View File

@ -230,6 +230,23 @@ bool QWaylandLayerSurface::requestActivate()
return false;
}
bool QWaylandLayerSurface::requestActivateOnShow()
{
if (!m_interface->activateOnShow()) {
return false;
}
if (m_interface->keyboardInteractivity() == Window::KeyboardInteractivityNone) {
return false;
}
if (m_window->window()->property("_q_showWithoutActivating").toBool()) {
return false;
}
return requestActivate();
}
void QWaylandLayerSurface::setXdgActivationToken(const QString &token)
{
m_activationToken = token;