From b2ed73cdb0cd9a1bfa28999baa31689ee42207b8 Mon Sep 17 00:00:00 2001 From: Nerdopolis Turfwalker Date: Tue, 24 Apr 2018 14:18:03 +0200 Subject: [PATCH] fb_backend_qpainter_backend: Use logind to determine if the session is active. Summary: TTYs are only available for seat0, so when starting a framebuffer kwin on seat1, it never draws, because drawing is always suspended, because it is being treated as not active Test Plan: The framebuffer backend draws on seat1, and /dev/fb1 and when I switch back to my Weston greeter, (when it's also using the frame buffer,) it doesn't try to draw on top of it. Reviewers: #kwin, graesslin Reviewed By: #kwin, graesslin Subscribers: davidedmundson, rkflx, graesslin, kwin, #kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D9574 --- plugins/platforms/fbdev/scene_qpainter_fb_backend.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/platforms/fbdev/scene_qpainter_fb_backend.cpp b/plugins/platforms/fbdev/scene_qpainter_fb_backend.cpp index ec311586c9..50e365b4e7 100644 --- a/plugins/platforms/fbdev/scene_qpainter_fb_backend.cpp +++ b/plugins/platforms/fbdev/scene_qpainter_fb_backend.cpp @@ -20,6 +20,7 @@ along with this program. If not, see . #include "scene_qpainter_fb_backend.h" #include "fb_backend.h" #include "composite.h" +#include "logind.h" #include "cursor.h" #include "virtual_terminal.h" // Qt @@ -75,7 +76,7 @@ void FramebufferQPainterBackend::present(int mask, const QRegion &damage) { Q_UNUSED(mask) Q_UNUSED(damage) - if (!VirtualTerminal::self()->isActive()) { + if (!LogindIntegration::self()->isActiveSession()) { return; } QPainter p(&m_backBuffer);