From e790b0761e04ff9c240ed879bacc5270339c63b5 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 9 Feb 2020 12:00:30 -0800 Subject: [PATCH] Add another RPi hack to fix mouse capture in full-screen in LXDE --- app/streaming/session.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/streaming/session.cpp b/app/streaming/session.cpp index f6c3c948..774defc9 100644 --- a/app/streaming/session.cpp +++ b/app/streaming/session.cpp @@ -461,6 +461,15 @@ bool Session::initialize() break; } + // HACK: Using a full-screen window breaks mouse capture on the Pi's LXDE + // GUI environment. Force the session to use windowed mode (which won't + // really matter anyway because the MMAL renderer always draws full-screen). + if (qgetenv("DESKTOP_SESSION") == "LXDE-pi") { + SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, + "Forcing windowed mode on LXDE-Pi"); + m_FullScreenFlag = 0; + } + // Check for validation errors/warnings and emit // signals for them, if appropriate bool ret = validateLaunch(testWindow);