Commit f24f2bd5 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Enable shadow protocol support for all Wayland clients

The main motivation for this change is to enable support for our
proprietary shadow protocol in LayerShellV1Client.

Previously we couldn't move code that handles shadows in WaylandClient
because WaylandClient::bufferGeometry() was a pure virtual method.
parent 989e0987
......@@ -32,7 +32,6 @@ InputPanelV1Client::InputPanelV1Client(InputPanelSurfaceV1Interface *panelSurfac
setSkipTaskbar(true);
setPositionSyncMode(SyncMode::Sync);
setSizeSyncMode(SyncMode::Sync);
setupCompositing();
connect(surface(), &SurfaceInterface::aboutToBeDestroyed, this, &InputPanelV1Client::destroyClient);
connect(surface(), &SurfaceInterface::sizeChanged, this, &InputPanelV1Client::reposition);
......
......@@ -50,7 +50,6 @@ LayerShellV1Client::LayerShellV1Client(LayerSurfaceV1Interface *shellSurface,
setSkipTaskbar(true);
setSizeSyncMode(SyncMode::Async);
setPositionSyncMode(SyncMode::Sync);
setupCompositing();
connect(shellSurface, &LayerSurfaceV1Interface::aboutToBeDestroyed,
this, &LayerShellV1Client::destroyClient);
......
......@@ -41,13 +41,13 @@ Q_DECLARE_FLAGS(WaylandGeometryTypes, WaylandGeometryType)
WaylandClient::WaylandClient(SurfaceInterface *surface)
{
// Note that we cannot setup compositing here because we may need to call visibleRect(),
// which in its turn will call bufferGeometry(), which is a pure virtual method.
setSurface(surface);
setupCompositing();
m_windowId = waylandServer()->createWindowId(surface);
connect(surface, &SurfaceInterface::shadowChanged,
this, &WaylandClient::updateShadow);
connect(this, &WaylandClient::frameGeometryChanged,
this, &WaylandClient::updateClientOutputs);
connect(this, &WaylandClient::desktopFileNameChanged,
......
......@@ -41,7 +41,6 @@ XdgSurfaceClient::XdgSurfaceClient(XdgSurfaceInterface *shellSurface)
{
setSizeSyncMode(SyncMode::Async);
setPositionSyncMode(SyncMode::Async);
setupCompositing();
connect(shellSurface, &XdgSurfaceInterface::configureAcknowledged,
this, &XdgSurfaceClient::handleConfigureAcknowledged);
......@@ -49,8 +48,6 @@ XdgSurfaceClient::XdgSurfaceClient(XdgSurfaceInterface *shellSurface)
this, &XdgSurfaceClient::destroyClient);
connect(shellSurface->surface(), &SurfaceInterface::committed,
this, &XdgSurfaceClient::handleCommit);
connect(shellSurface->surface(), &SurfaceInterface::shadowChanged,
this, &XdgSurfaceClient::updateShadow);
#if 0 // TODO: Refactor kwin core in order to uncomment this code.
connect(shellSurface->surface(), &SurfaceInterface::mapped,
this, &XdgSurfaceClient::setReadyForPainting);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment