Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cube: Port Wayland impl from wl-shell to xdg-shell
This change ports vkcube in both C and C++ versions to use the stable xdg-shell protocol for Wayland compositors. The original wl-shell protocol has been deprecated and is being removed from major compositor libraries; wlroots has already dropped support. New cmake modules have been added to look for Wayland-Protocols (containing XML descriptions of all common protocols) and `wayland-scanner`, the tool used to convert the XML files to a usable C interface. The change also adds support for the xdg-decoration protocol, which for some compositors is provided and needed to let them know that they should draw a titlebar, borders with resize controls, and other standard features. Change-Id: I39bedda93a7c5d0aeeb59c68023552723b413567
- Loading branch information
1 parent
39b3005
commit 6f6e337
Showing
5 changed files
with
239 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Wayland protocols Defines: | ||
# | ||
# * WAYLAND_PROTOCOLS_FOUND True if the wayland-protocols data path is found | ||
# * WAYLAND_PROTOCOLS_PATH Path to the wayland-scanner executable | ||
# | ||
|
||
if(NOT WIN32) | ||
find_package(PkgConfig) | ||
pkg_check_modules(PKG_WAYLAND_PROTOCOLS QUIET wayland-protocols) | ||
set(WAYLAND_PROTOCOLS_PATH ${PKG_WAYLAND_PROTOCOLS_PREFIX}/share/wayland-protocols) | ||
find_package_handle_standard_args(WAYLAND DEFAULT_MSG WAYLAND_PROTOCOLS_PATH) | ||
mark_as_advanced(WAYLAND_PROTOCOLS_PATH) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Wayland scanner Defines: | ||
# | ||
# * WAYLAND_SCANNER_FOUND True if wayland-scanner is found | ||
# * WAYLAND_SCANNER_EXECUTABLE Path to the wayland-scanner executable | ||
# | ||
|
||
if(NOT WIN32) | ||
# Delegate to pkg-config for our first guess | ||
find_package(PkgConfig) | ||
pkg_check_modules(PKG_WAYLAND_SCANNER QUIET wayland-scanner) | ||
find_program(WAYLAND_SCANNER_EXECUTABLE wayland-scanner ${PKG_WAYLAND_SCANNER_PREFIX}/bin/wayland-scanner) | ||
find_package_handle_standard_args(WAYLAND DEFAULT_MSG WAYLAND_SCANNER_EXECUTABLE) | ||
mark_as_advanced(WAYLAND_SCANNER_EXECUTABLE) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.