aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Kerling <pkerling@casix.org>2017-12-02 14:48:38 +0200
committerPhilipp Kerling <pkerling@casix.org>2018-01-14 14:31:19 +0100
commit27d61dfb26924c28f18f2b9c693aee5ca42b162e (patch)
treeaee30bfc83ed70f4107de273b1cdcceac656f7bf
parent7dd54e184dd841cfe5da27cfe453f4faf67c293b (diff)
[wayland] Prefer stable xdg-shell shell surface
-rw-r--r--xbmc/windowing/wayland/ShellSurfaceXdgShellUnstableV6.h7
-rw-r--r--xbmc/windowing/wayland/WinSystemWayland.cpp9
2 files changed, 14 insertions, 2 deletions
diff --git a/xbmc/windowing/wayland/ShellSurfaceXdgShellUnstableV6.h b/xbmc/windowing/wayland/ShellSurfaceXdgShellUnstableV6.h
index 74764e4057..c5c7284cf4 100644
--- a/xbmc/windowing/wayland/ShellSurfaceXdgShellUnstableV6.h
+++ b/xbmc/windowing/wayland/ShellSurfaceXdgShellUnstableV6.h
@@ -31,6 +31,13 @@ namespace WINDOWING
namespace WAYLAND
{
+/**
+ * Shell surface implementation for unstable xdg_shell in version 6
+ *
+ * xdg_shell was accepted as a stable protocol in wayland-protocols, which
+ * means this class is deprecated and can be safely removed once the relevant
+ * compositors have made the switch.
+ */
class CShellSurfaceXdgShellUnstableV6 : public IShellSurface
{
public:
diff --git a/xbmc/windowing/wayland/WinSystemWayland.cpp b/xbmc/windowing/wayland/WinSystemWayland.cpp
index b2ff212a72..df09b11732 100644
--- a/xbmc/windowing/wayland/WinSystemWayland.cpp
+++ b/xbmc/windowing/wayland/WinSystemWayland.cpp
@@ -44,6 +44,7 @@
#include "settings/DisplaySettings.h"
#include "settings/Settings.h"
#include "ShellSurfaceWlShell.h"
+#include "ShellSurfaceXdgShell.h"
#include "ShellSurfaceXdgShellUnstableV6.h"
#include "threads/SingleLock.h"
#include "Util.h"
@@ -303,10 +304,14 @@ bool CWinSystemWayland::CreateNewWindow(const std::string& name,
// Try with this resolution if compositor does not say otherwise
UpdateSizeVariables({res.iWidth, res.iHeight}, m_scale, m_shellSurfaceState, false);
- m_shellSurface.reset(CShellSurfaceXdgShellUnstableV6::TryCreate(*this, *m_connection, m_surface, name, KODI::LINUX::DESKTOP_FILE_NAME));
+ m_shellSurface.reset(CShellSurfaceXdgShell::TryCreate(*this, *m_connection, m_surface, name, KODI::LINUX::DESKTOP_FILE_NAME));
if (!m_shellSurface)
{
- CLog::LogF(LOGWARNING, "Compositor does not support xdg_shell unstable v6 protocol - falling back to wl_shell, not all features might work");
+ m_shellSurface.reset(CShellSurfaceXdgShellUnstableV6::TryCreate(*this, *m_connection, m_surface, name, KODI::LINUX::DESKTOP_FILE_NAME));
+ }
+ if (!m_shellSurface)
+ {
+ CLog::LogF(LOGWARNING, "Compositor does not support xdg_shell protocol (stable or unstable v6) - falling back to wl_shell, not all features might work");
m_shellSurface.reset(new CShellSurfaceWlShell(*this, *m_connection, m_surface, name, KODI::LINUX::DESKTOP_FILE_NAME));
}