Only compile VirtualTerminal if libinput is found
The implementation of VirtualTerminal is too linux specific and doesn't compile on e.g. freebsd. Currently the most usage is in combination with libinput. Only usage is: * libinput related functionality in InputRedirection * backends without custom input handling Thus binding the feature to whether libinput is available is currently the least invasive approach to get it compile on non-Linux. In the long run this needs a different solution. The functionality provided by VirtualTerminal is required and without the backends don't work. It's needed to get notified about VT switches, when KWin needs to stop rendering. So a solution for non-Linux needs to be found if non-Linux wants to provide Wayland in future. REVIEW: 126182
This commit is contained in:
parent
c8e0a4b975
commit
a055e2de82
3 changed files with 12 additions and 8 deletions
|
@ -376,7 +376,6 @@ set(kwin_KDEINIT_SRCS
|
|||
abstract_egl_backend.cpp
|
||||
eglonxbackend.cpp
|
||||
abstract_backend.cpp
|
||||
virtual_terminal.cpp
|
||||
shell_client.cpp
|
||||
wayland_server.cpp
|
||||
wayland_cursor_theme.cpp
|
||||
|
@ -421,6 +420,7 @@ if(HAVE_INPUT)
|
|||
libinput/connection.cpp
|
||||
libinput/events.cpp
|
||||
libinput/libinput_logging.cpp
|
||||
virtual_terminal.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
if(HAVE_INPUT)
|
||||
if(HAVE_DRM)
|
||||
add_subdirectory(drm)
|
||||
endif()
|
||||
|
@ -5,6 +6,7 @@ add_subdirectory(fbdev)
|
|||
if(HAVE_LIBHYBRIS)
|
||||
add_subdirectory(hwcomposer)
|
||||
endif()
|
||||
endif()
|
||||
add_subdirectory(virtual)
|
||||
add_subdirectory(wayland)
|
||||
if(X11_XCB_FOUND)
|
||||
|
|
|
@ -31,11 +31,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "workspace.h"
|
||||
#if HAVE_INPUT
|
||||
#include "libinput/connection.h"
|
||||
#include "virtual_terminal.h"
|
||||
#endif
|
||||
#include "abstract_backend.h"
|
||||
#include "shell_client.h"
|
||||
#include "wayland_server.h"
|
||||
#include "virtual_terminal.h"
|
||||
#include <KWayland/Server/display.h>
|
||||
#include <KWayland/Server/fakeinput_interface.h>
|
||||
#include <KWayland/Server/seat_interface.h>
|
||||
|
@ -939,6 +939,7 @@ void InputRedirection::processKeyboardKey(uint32_t key, InputRedirection::Keyboa
|
|||
emit keyboardModifiersChanged(keyboardModifiers(), oldMods);
|
||||
}
|
||||
// check for vt-switch
|
||||
#if HAVE_INPUT
|
||||
if (VirtualTerminal::self()) {
|
||||
const xkb_keysym_t keysym = m_xkb->toKeysym(key);
|
||||
if (state == KWin::InputRedirection::KeyboardKeyPressed &&
|
||||
|
@ -947,6 +948,7 @@ void InputRedirection::processKeyboardKey(uint32_t key, InputRedirection::Keyboa
|
|||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
if (waylandServer()->isScreenLocked()) {
|
||||
|
|
Loading…
Reference in a new issue