Skip to content

Fix compilation failure without HAVE_X11_XINPUT

Parag W. requested to merge paragkde/kwin:master into master

Fixes below compile failure without HAVE_X11_XINPUT set -

Click to expand /usr/include/c++/12/bits/unique_ptr.h: In instantiation of ‘void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = KWin::XInputIntegration]’: /usr/include/c++/12/bits/unique_ptr.h:396:17: required from ‘std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = KWin::XInputIntegration; _Dp = std::default_delete]’ /volumes/raid_data/kde/src/kwin/src/backends/x11/standalone/x11_standalone_backend.cpp:106:50: required from here /usr/include/c++/12/bits/unique_ptr.h:93:23: error: invalid application of ‘sizeof’ to incomplete type ‘KWin::XInputIntegration’ 93 | static_assert(sizeof(_Tp)>0,

Reason for the error being that the X11StandaloneBackend constructor needs to make_unique_ptr for XInputIntegration and forward declaration doesn't suffice. I tried wrapping m_xinputIntegration inside HAVE_X11_XINPUT which seems like the right fix for this issue along with wrapping some impl code that references it but the pipeline somehow fails with an implausible error - the var declaration wrapped in HAVE_X11_XINPUT is skipped but the cpp side code wrapped under the same conditional macro is compiled which fails! I opted to use this fix instead to just unconditionally include the header for XInputIntegration allowing the constructor code to compile

Merge request reports

Loading