libobs: Add Wayland hotkey infrastructure
Users on Wayland are displeased that they cannot see their hotkey bindings. This enables key reporting like X11, and has the infrastructure in place in case Wayland ever decides to allow for capturing input.master
parent
21fdd83b7e
commit
0729007f19
|
@ -33,6 +33,7 @@ sudo apt-get install -y \
|
|||
libvlc-dev \
|
||||
libx11-dev \
|
||||
libx264-dev \
|
||||
libxkbcommon-dev \
|
||||
libxcb-randr0-dev \
|
||||
libxcb-shm0-dev \
|
||||
libxcb-xinerama0-dev \
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
# Once done these will be defined:
|
||||
#
|
||||
# XKBCOMMON_FOUND XKBCOMMON_INCLUDE_DIRS XKBCOMMON_LIBRARIES
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(_XKBCOMMON QUIET xkbcommon)
|
||||
endif()
|
||||
|
||||
find_path(
|
||||
XKBCOMMON_INCLUDE_DIR
|
||||
NAMES xkbcommon/xkbcommon.h
|
||||
HINTS ${_XKBCOMMON_INCLUDE_DIRS}
|
||||
PATHS /usr/include /usr/local/include /opt/local/include)
|
||||
|
||||
find_library(
|
||||
XKBCOMMON_LIB
|
||||
NAMES xkbcommon libxkbcommon
|
||||
HINTS ${_XKBCOMMON_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib /opt/local/lib)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Xkbcommon DEFAULT_MSG XKBCOMMON_LIB
|
||||
XKBCOMMON_INCLUDE_DIR)
|
||||
mark_as_advanced(XKBCOMMON_INCLUDE_DIR XKBCOMMON_LIB)
|
||||
|
||||
if(XKBCOMMON_FOUND)
|
||||
set(XKBCOMMON_INCLUDE_DIRS ${XKBCOMMON_INCLUDE_DIR})
|
||||
set(XKBCOMMON_LIBRARIES ${XKBCOMMON_LIB})
|
||||
|
||||
if(NOT TARGET Xkbcommon::Xkbcommon)
|
||||
add_library(Xkbcommon::Xkbcommon INTERFACE IMPORTED)
|
||||
set_target_properties(
|
||||
Xkbcommon::Xkbcommon PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
|
||||
"${XKBCOMMON_INCLUDE_DIRS}")
|
||||
endif()
|
||||
endif()
|
|
@ -201,17 +201,20 @@ elseif(UNIX)
|
|||
|
||||
if(ENABLE_WAYLAND)
|
||||
find_package(Wayland COMPONENTS Client REQUIRED)
|
||||
find_package(Xkbcommon REQUIRED)
|
||||
|
||||
set(libobs_PLATFORM_SOURCES ${libobs_PLATFORM_SOURCES}
|
||||
obs-nix-wayland.c)
|
||||
|
||||
include_directories(
|
||||
${WAYLAND_CLIENT_INCLUDE_DIR})
|
||||
${WAYLAND_CLIENT_INCLUDE_DIR}
|
||||
${XKBCOMMON_INCLUDE_DIR})
|
||||
add_definitions(
|
||||
${WAYLAND_DEFINITIONS})
|
||||
set(libobs_PLATFORM_DEPS
|
||||
${libobs_PLATFORM_DEPS}
|
||||
${WAYLAND_CLIENT_LIBRARIES})
|
||||
${WAYLAND_CLIENT_LIBRARIES}
|
||||
${XKBCOMMON_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(HAVE_PULSEAUDIO)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue