From f5b83d18b8927d965acbaa99caa6369c8ea0831d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 14 Jun 2016 10:53:46 +0200 Subject: [PATCH] [platforms/drm] Apply new global position on DrmOutput for a changeset Summary: When we get a configuration request, we also need to update the global position on the DrmOutput, otherwise Wayland will know about the new position, but KWin internally does not. In addition we also need to trigger the changed signal on KWin::Screens, so that internally code can react on the change. With this change configuring layout of connected screens in KScreen does work also in KWin. Reviewers: #kwin, #plasma_on_wayland, sebas Subscribers: plasma-devel, kwin Tags: #plasma_on_wayland, #kwin Differential Revision: https://phabricator.kde.org/D1858 --- plugins/platforms/drm/drm_backend.cpp | 1 + plugins/platforms/drm/drm_output.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/plugins/platforms/drm/drm_backend.cpp b/plugins/platforms/drm/drm_backend.cpp index b30318a7dd..2467cce3dd 100644 --- a/plugins/platforms/drm/drm_backend.cpp +++ b/plugins/platforms/drm/drm_backend.cpp @@ -387,6 +387,7 @@ void DrmBackend::configurationChangeRequested(KWayland::Server::OutputConfigurat } drmoutput->setChanges(changeset); } + emit screens()->changed(); } DrmOutput *DrmBackend::findOutput(quint32 connector) diff --git a/plugins/platforms/drm/drm_output.cpp b/plugins/platforms/drm/drm_output.cpp index 3e60127cc5..31f563d6be 100644 --- a/plugins/platforms/drm/drm_output.cpp +++ b/plugins/platforms/drm/drm_output.cpp @@ -604,6 +604,7 @@ bool DrmOutput::commitChanges() qCDebug(KWIN_DRM) << "Server setting position: " << m_changeset->position(); m_waylandOutput->setGlobalPosition(m_changeset->position()); m_waylandOutputDevice->setGlobalPosition(m_changeset->position()); + setGlobalPos(m_changeset->position()); // may just work already! } if (m_changeset->scaleChanged()) {