diff --git a/packages/mediacenter/kodi/patches/kodi-999.16-PR20632-base-m_bFullScreenRoot-setting-on-res-infos-bFullScreen.patch b/packages/mediacenter/kodi/patches/kodi-999.16-PR20632-base-m_bFullScreenRoot-setting-on-res-infos-bFullScreen.patch new file mode 100644 index 0000000000..fe64712f3e --- /dev/null +++ b/packages/mediacenter/kodi/patches/kodi-999.16-PR20632-base-m_bFullScreenRoot-setting-on-res-infos-bFullScreen.patch @@ -0,0 +1,66 @@ +From 81a2fb65100b88c31bb0168acc0c3b7bab09475a Mon Sep 17 00:00:00 2001 +From: Dominique Martinet +Date: Sun, 5 Dec 2021 23:46:25 +0900 +Subject: [PATCH] windowing: base m_bFullScreenRoot setting on res info's + bFullScreen + +on wayland, the compositor can ignore fullscreen requests, so even if +application's InitWindow created a window with res >= DESKTOP we have +no guarantee that the actual window created is actually fullscreen. + +CreateNewWindow will fill GetResolutionInfo(res) so we can check that +for bFullScreen and use this information... in theory. + +wayland was inconditionally setting it to the requested fullscreen +state, so also make sure it's set based on the real state by keeping +m_bFullScreen up to date and using that instead. + +Fixes: #20629 +--- + xbmc/windowing/GraphicContext.cpp | 2 +- + xbmc/windowing/wayland/WinSystemWayland.cpp | 5 +++-- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/xbmc/windowing/GraphicContext.cpp b/xbmc/windowing/GraphicContext.cpp +index 6a90ee28fc05c..83fedbabe1856 100644 +--- a/xbmc/windowing/GraphicContext.cpp ++++ b/xbmc/windowing/GraphicContext.cpp +@@ -409,7 +409,7 @@ void CGraphicContext::SetVideoResolutionInternal(RESOLUTION res, bool forceUpdat + return; + } + +- if (res >= RES_DESKTOP) ++ if (CDisplaySettings::GetInstance().GetResolutionInfo(res).bFullScreen) + { + CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->m_fullScreen = true; + m_bFullScreenRoot = true; +diff --git a/xbmc/windowing/wayland/WinSystemWayland.cpp b/xbmc/windowing/wayland/WinSystemWayland.cpp +index bd17b44a19e50..02ba323d64817 100644 +--- a/xbmc/windowing/wayland/WinSystemWayland.cpp ++++ b/xbmc/windowing/wayland/WinSystemWayland.cpp +@@ -343,7 +343,7 @@ bool CWinSystemWayland::CreateNewWindow(const std::string& name, + + // Update resolution with real size as it could have changed due to configure() + UpdateDesktopResolution(res, res.strOutput, m_bufferSize.Width(), m_bufferSize.Height(), res.fRefreshRate, 0); +- res.bFullScreen = fullScreen; ++ res.bFullScreen = m_bFullScreen; + + // Now start processing events + // +@@ -787,7 +787,7 @@ void CWinSystemWayland::OnConfigure(std::uint32_t serial, CSizeInt size, IShellS + CLog::LogF(LOGDEBUG, "Initial configure serial {}: size {}x{} state {}", serial, size.Width(), + size.Height(), IShellSurface::StateToString(state)); + m_shellSurfaceState = state; +- if (!size.IsZero()) ++ if (!size.IsZero() || state.test(IShellSurface::STATE_FULLSCREEN)) + { + UpdateSizeVariables(size, m_scale, m_shellSurfaceState, true); + } +@@ -1015,6 +1015,7 @@ CWinSystemWayland::SizeUpdateInformation CWinSystemWayland::UpdateSizeVariables( + m_surfaceSize = sizes.surfaceSize; + m_bufferSize = sizes.bufferSize; + m_configuredSize = sizes.configuredSize; ++ m_bFullScreen = state.test(IShellSurface::STATE_FULLSCREEN); + + SizeUpdateInformation changes{m_surfaceSize != oldSurfaceSize, m_bufferSize != oldBufferSize, m_configuredSize != oldConfiguredSize, m_scale != oldBufferScale}; +