aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpkerling <pkerling@casix.org>2019-02-17 00:20:49 +0100
committerGitHub <noreply@github.com>2019-02-17 00:20:49 +0100
commit33be1ecbd97dab28ef17b9b0c8bfd385f73c7fdc (patch)
treebd2982c8d5be033092cd56d00e4d83a142964917
parentd3785c85c3d4cbf8a90aecb6ff071c67af16e05c (diff)
parente287cb6c271053446b1463736284df058ca6c061 (diff)
[wayland] Fix startup crash (#15531)
[wayland] Fix startup crash
-rw-r--r--xbmc/windowing/wayland/WinSystemWayland.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/xbmc/windowing/wayland/WinSystemWayland.cpp b/xbmc/windowing/wayland/WinSystemWayland.cpp
index 72337ffccf..92686410fe 100644
--- a/xbmc/windowing/wayland/WinSystemWayland.cpp
+++ b/xbmc/windowing/wayland/WinSystemWayland.cpp
@@ -299,6 +299,19 @@ bool CWinSystemWayland::CreateNewWindow(const std::string& name,
m_windowDecorator.reset(new CWindowDecorator(*this, *m_connection, m_surface));
+ m_seatInputProcessing.reset(new CSeatInputProcessing(m_surface, *this));
+ m_seatRegistry.reset(new CRegistry{*m_connection});
+ // version 2 adds name event -> optional
+ // version 4 adds wl_keyboard repeat_info -> optional
+ // version 5 adds discrete axis events in wl_pointer -> unused
+ m_seatRegistry->Request<wayland::seat_t>(1, 5, std::bind(&CWinSystemWayland::OnSeatAdded, this, _1, _2), std::bind(&CWinSystemWayland::OnSeatRemoved, this, _1));
+ m_seatRegistry->Bind();
+
+ if (m_seats.empty())
+ {
+ CLog::Log(LOGWARNING, "Wayland compositor did not announce a wl_seat - you will not have any input devices for the time being");
+ }
+
if (fullScreen)
{
m_shellSurfaceState.set(IShellSurface::STATE_FULLSCREEN);
@@ -350,19 +363,6 @@ bool CWinSystemWayland::CreateNewWindow(const std::string& name,
UpdateDesktopResolution(res, m_bufferSize.Width(), m_bufferSize.Height(), res.fRefreshRate, 0);
res.bFullScreen = fullScreen;
- m_seatInputProcessing.reset(new CSeatInputProcessing(m_surface, *this));
- m_seatRegistry.reset(new CRegistry{*m_connection});
- // version 2 adds name event -> optional
- // version 4 adds wl_keyboard repeat_info -> optional
- // version 5 adds discrete axis events in wl_pointer -> unused
- m_seatRegistry->Request<wayland::seat_t>(1, 5, std::bind(&CWinSystemWayland::OnSeatAdded, this, _1, _2), std::bind(&CWinSystemWayland::OnSeatRemoved, this, _1));
- m_seatRegistry->Bind();
-
- if (m_seats.empty())
- {
- CLog::Log(LOGWARNING, "Wayland compositor did not announce a wl_seat - you will not have any input devices for the time being");
- }
-
// Now start processing events
//
// There are two stages to the event handling: