diff --git a/autotests/wayland/plasma_surface_test.cpp b/autotests/wayland/plasma_surface_test.cpp index e522692df8..d14fb425e3 100644 --- a/autotests/wayland/plasma_surface_test.cpp +++ b/autotests/wayland/plasma_surface_test.cpp @@ -148,6 +148,7 @@ void PlasmaSurfaceTest::testRoleOnAllDesktops_data() QTest::newRow("OSD") << PlasmaShellSurface::Role::OnScreenDisplay << true; QTest::newRow("Normal") << PlasmaShellSurface::Role::Normal << false; QTest::newRow("Notification") << PlasmaShellSurface::Role::Notification << true; + QTest::newRow("ToolTip") << PlasmaShellSurface::Role::ToolTip << true; } void PlasmaSurfaceTest::testRoleOnAllDesktops() @@ -206,6 +207,7 @@ void PlasmaSurfaceTest::testRoleOnAllDesktops() QEXPECT_FAIL("Panel", "PS before WS not supported", Continue); QEXPECT_FAIL("OSD", "PS before WS not supported", Continue); QEXPECT_FAIL("Notification", "PS before WS not supported", Continue); + QEXPECT_FAIL("ToolTip", "PS before WS not supported", Continue); QCOMPARE(c->isOnAllDesktops(), expectedOnAllDesktops); } @@ -220,6 +222,7 @@ void PlasmaSurfaceTest::testAcceptsFocus_data() QTest::newRow("OSD") << PlasmaShellSurface::Role::OnScreenDisplay << false << false; QTest::newRow("Normal") << PlasmaShellSurface::Role::Normal << true << true; QTest::newRow("Notification") << PlasmaShellSurface::Role::Notification << false << false; + QTest::newRow("ToolTip") << PlasmaShellSurface::Role::ToolTip << false << false; } void PlasmaSurfaceTest::testAcceptsFocus() diff --git a/shell_client.cpp b/shell_client.cpp index d211b7ea44..08176e877f 100644 --- a/shell_client.cpp +++ b/shell_client.cpp @@ -735,6 +735,7 @@ bool ShellClient::acceptsFocus() const } if (m_plasmaShellSurface) { if (m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::OnScreenDisplay || + m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::ToolTip || m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::Notification) { return false; } @@ -897,6 +898,9 @@ void ShellClient::installPlasmaShellSurface(PlasmaShellSurfaceInterface *surface case PlasmaShellSurfaceInterface::Role::Notification: type = NET::Notification; break; + case PlasmaShellSurfaceInterface::Role::ToolTip: + type = NET::Tooltip; + break; case PlasmaShellSurfaceInterface::Role::Normal: default: type = NET::Normal; @@ -904,7 +908,7 @@ void ShellClient::installPlasmaShellSurface(PlasmaShellSurfaceInterface *surface } if (type != m_windowType) { m_windowType = type; - if (m_windowType == NET::Desktop || type == NET::Dock || type == NET::OnScreenDisplay || type == NET::Notification) { + if (m_windowType == NET::Desktop || type == NET::Dock || type == NET::OnScreenDisplay || type == NET::Notification || type == NET::Tooltip) { setOnAllDesktops(true); } workspace()->updateClientArea();