QWindow::requestActivate() is not supported on Wayland

Return false for the WindowActivation capability to ensure we don't run tests
that require it.

Change-Id: Ia24d6eef02d462a25f3d50597debda9e062b3955
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
This commit is contained in:
Johan Klokkhammer Helsing 2018-03-02 17:02:15 +01:00 committed by Johan Helsing
parent b127a86f1d
commit 1605c84bbf
2 changed files with 3 additions and 2 deletions

View File

@ -179,6 +179,8 @@ bool QWaylandIntegration::hasCapability(QPlatformIntegration::Capability cap) co
return true; return true;
case RasterGLSurface: case RasterGLSurface:
return true; return true;
case WindowActivation:
return false;
default: return QPlatformIntegration::hasCapability(cap); default: return QPlatformIntegration::hasCapability(cap);
} }
} }

View File

@ -930,8 +930,7 @@ void QWaylandWindow::restoreMouseCursor(QWaylandInputDevice *device)
void QWaylandWindow::requestActivateWindow() void QWaylandWindow::requestActivateWindow()
{ {
// no-op. Wayland does not have activation protocol, qCWarning(lcQpaWayland) << "Wayland does not support QWindow::requestActivate()";
// we rely on compositor setting keyboard focus based on window stacking.
} }
void QWaylandWindow::unfocus() void QWaylandWindow::unfocus()