Add option to enable/disable wayland
This commit is contained in:
parent
4c6a7dc116
commit
3fff3cad6c
2 changed files with 8 additions and 1 deletions
|
|
@ -68,6 +68,12 @@ pkg_check_modules(SDL2_IMAGE SDL2_image REQUIRED)
|
|||
pkg_check_modules(DBUS dbus-1 REQUIRED)
|
||||
pkg_check_modules(LXC lxc REQUIRED)
|
||||
pkg_check_modules(PROPERTIES_CPP properties-cpp REQUIRED)
|
||||
|
||||
option(ANBOX_ENABLE_WAYLAND "Enable wayland support" ON)
|
||||
if (ANBOX_ENABLE_WAYLAND)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWAYLAND_SUPPORT")
|
||||
endif()
|
||||
|
||||
pkg_check_modules(LIBSYSTEMD libsystemd REQUIRED)
|
||||
# FIXME mir support is currently broken due to mir's API
|
||||
# being broken with recent landings in Ubuntu 16.04
|
||||
|
|
@ -140,4 +146,3 @@ option(TOUCH_INPUT "Enable touch input support" OFF)
|
|||
if (TOUCH_INPUT)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DENABLE_TOUCH_INPUT")
|
||||
endif()
|
||||
|
||||
|
|
|
|||
|
|
@ -83,10 +83,12 @@ Window::Window(const std::shared_ptr<Renderer> &renderer,
|
|||
native_display_ = static_cast<EGLNativeDisplayType>(info.info.x11.display);
|
||||
native_window_ = static_cast<EGLNativeWindowType>(info.info.x11.window);
|
||||
break;
|
||||
#if defined(WAYLAND_SUPPORT)
|
||||
case SDL_SYSWM_WAYLAND:
|
||||
native_display_ = static_cast<EGLNativeDisplayType>(info.info.wl.display);
|
||||
native_window_ = reinterpret_cast<EGLNativeWindowType>(info.info.wl.surface);
|
||||
break;
|
||||
#endif
|
||||
#if defined(MIR_SUPPORT)
|
||||
case SDL_SYSWM_MIR: {
|
||||
native_display_ = static_cast<EGLNativeDisplayType>(mir_connection_get_egl_native_display(info.info.mir.connection));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue