提交 3fff3cad 编写于 作者: M Marius Gripsgard

Add option to enable/disable wayland

上级 4c6a7dc1
......@@ -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));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册