diff --git a/CMakeLists.txt b/CMakeLists.txt index eb6b6b9..217aeac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,99 +1,102 @@ cmake_minimum_required(VERSION 3.5) set(KF5_VERSION "5.60.0") # handled by release scripts project(KWayland VERSION ${KF5_VERSION}) # ECM setup include(FeatureSummary) find_package(ECM 5.60.0 NO_MODULE) set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://projects.kde.org/projects/kdesupport/extra-cmake-modules") feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) -set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) +set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_SOURCE_DIR}/cmake/Modules) include(FeatureSummary) include(GenerateExportHeader) include(CMakePackageConfigHelpers) include(ECMSetupVersion) include(ECMGenerateHeaders) include(CMakeFindFrameworks) include(ECMQtDeclareLoggingCategory) include(ECMPoQmTools) include(ECMAddQch) option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF) add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)") ecm_setup_version(PROJECT VARIABLE_PREFIX KWAYLAND VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kwayland_version.h" PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5WaylandConfigVersion.cmake" SOVERSION 5) # Dependencies set(REQUIRED_QT_VERSION 5.11.0) find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Concurrent Gui) -find_package(Wayland 1.13 COMPONENTS Client Server) +find_package(Wayland 1.15 COMPONENTS Client Server) set_package_properties(Wayland PROPERTIES TYPE REQUIRED ) find_package(WaylandScanner) +find_package(WaylandProtocols 1.15) +set_package_properties(WaylandProtocols PROPERTIES TYPE REQUIRED) + find_package(EGL) set_package_properties(EGL PROPERTIES TYPE REQUIRED) include(KDEInstallDirs) include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) include(KDECMakeSettings) include(CheckIncludeFile) check_include_file("linux/input.h" HAVE_LINUX_INPUT_H) configure_file(config-kwayland.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kwayland.h) include_directories(${CMAKE_CURRENT_BINARY_DIR}) # adjusting CMAKE_C_FLAGS to get wayland protocols to compile set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu90") add_definitions(-DQT_NO_FOREACH) # Subdirectories if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po") ecm_install_po_files_as_qm(po) endif() add_subdirectory(src) if (BUILD_TESTING) add_subdirectory(autotests) add_subdirectory(tests) endif() # create a Config.cmake and a ConfigVersion.cmake file and install them set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/KF5Wayland") if (BUILD_QCH) ecm_install_qch_export( TARGETS KF5Wayland_QCH FILE KF5WaylandQchTargets.cmake DESTINATION "${CMAKECONFIG_INSTALL_DIR}" COMPONENT Devel ) set(PACKAGE_INCLUDE_QCHTARGETS "include(\"\${CMAKE_CURRENT_LIST_DIR}/KF5WaylandQchTargets.cmake\")") endif() configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/KF5WaylandConfig.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/KF5WaylandConfig.cmake" INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR} ) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/KF5WaylandConfig.cmake" "${CMAKE_CURRENT_BINARY_DIR}/KF5WaylandConfigVersion.cmake" DESTINATION "${CMAKECONFIG_INSTALL_DIR}" COMPONENT Devel ) install(EXPORT KF5WaylandTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5WaylandTargets.cmake NAMESPACE KF5:: ) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kwayland_version.h DESTINATION ${KF5_INCLUDE_INSTALL_DIR} COMPONENT Devel ) feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/cmake/Modules/FindWaylandProtocols.cmake b/cmake/Modules/FindWaylandProtocols.cmake new file mode 100644 index 0000000..a3879d3 --- /dev/null +++ b/cmake/Modules/FindWaylandProtocols.cmake @@ -0,0 +1,60 @@ +#.rst: +# FindWaylandProtocols +# ------- +# +# Try to find wayland-protocols on a Unix system. +# +# This will define the following variables: +# +# ``WaylandProtocols_FOUND`` +# True if (the requested version of) wayland-protocols is available +# ``WaylandProtocols_VERSION`` +# The version of wayland-protocols +# ``WaylandProtocols_DATADIR`` +# The wayland protocols data directory + +#============================================================================= +# Copyright 2019 Vlad Zagorodniy +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#============================================================================= + +find_package(PkgConfig) +pkg_check_modules(PKG_wayland_protocols QUIET wayland-protocols) + +set(WaylandProtocols_VERSION ${PKG_wayland_protocols_VERSION}) +pkg_get_variable(WaylandProtocols_DATADIR wayland-protocols pkgdatadir) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(WaylandProtocols + FOUND_VAR WaylandProtocols_FOUND + REQUIRED_VARS WaylandProtocols_DATADIR + VERSION_VAR WaylandProtocols_VERSION +) + +include(FeatureSummary) +set_package_properties(WaylandProtocols PROPERTIES + DESCRIPTION "Specifications of extended Wayland protocols" + URL "https://wayland.freedesktop.org/" +) diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt index e50d5c4..d3aa7a3 100644 --- a/src/client/CMakeLists.txt +++ b/src/client/CMakeLists.txt @@ -1,321 +1,321 @@ remove_definitions(-DQT_NO_CAST_FROM_BYTEARRAY) remove_definitions(-DQT_NO_CAST_FROM_ASCII) remove_definitions(-DQT_NO_CAST_TO_ASCII) # needed to access QPA include_directories(SYSTEM ${Qt5Gui_PRIVATE_INCLUDE_DIRS}) set(CLIENT_LIB_SRCS appmenu.cpp buffer.cpp blur.cpp compositor.cpp connection_thread.cpp contrast.cpp slide.cpp event_queue.cpp datadevice.cpp datadevicemanager.cpp dataoffer.cpp datasource.cpp dpms.cpp fakeinput.cpp fullscreen_shell.cpp idle.cpp idleinhibit.cpp keyboard.cpp keystate.cpp remote_access.cpp outputconfiguration.cpp outputmanagement.cpp outputdevice.cpp output.cpp pointer.cpp pointerconstraints.cpp pointergestures.cpp plasmashell.cpp plasmavirtualdesktop.cpp plasmawindowmanagement.cpp plasmawindowmodel.cpp region.cpp registry.cpp relativepointer.cpp seat.cpp server_decoration.cpp server_decoration_palette.cpp shadow.cpp shell.cpp shm_pool.cpp subcompositor.cpp subsurface.cpp surface.cpp touch.cpp textinput.cpp textinput_v0.cpp textinput_v2.cpp xdgdecoration.cpp xdgshell.cpp xdgforeign_v2.cpp xdgforeign.cpp xdgshell_v5.cpp xdgshell_v6.cpp xdgshell_stable.cpp xdgoutput.cpp ../compat/wayland-xdg-shell-v5-protocol.c ) ecm_qt_declare_logging_category(CLIENT_LIB_SRCS HEADER logging.h IDENTIFIER KWAYLAND_CLIENT CATEGORY_NAME kwayland-client DEFAULT_SEVERITY Critical) ecm_add_wayland_client_protocol(CLIENT_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/fullscreen-shell.xml BASENAME fullscreen-shell ) ecm_add_wayland_client_protocol(CLIENT_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/output-management.xml BASENAME output-management ) ecm_add_wayland_client_protocol(CLIENT_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/outputdevice.xml BASENAME org_kde_kwin_outputdevice ) ecm_add_wayland_client_protocol(CLIENT_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/plasma-shell.xml BASENAME plasma-shell ) ecm_add_wayland_client_protocol(CLIENT_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/plasma-virtual-desktop.xml BASENAME plasma-virtual-desktop ) ecm_add_wayland_client_protocol(CLIENT_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/plasma-window-management.xml BASENAME plasma-window-management ) ecm_add_wayland_client_protocol(CLIENT_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/idle.xml BASENAME idle ) ecm_add_wayland_client_protocol(CLIENT_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/fake-input.xml BASENAME fake-input ) ecm_add_wayland_client_protocol(CLIENT_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/shadow.xml BASENAME shadow ) ecm_add_wayland_client_protocol(CLIENT_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/blur.xml BASENAME blur ) ecm_add_wayland_client_protocol(CLIENT_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/contrast.xml BASENAME contrast ) ecm_add_wayland_client_protocol(CLIENT_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/slide.xml BASENAME slide ) ecm_add_wayland_client_protocol(CLIENT_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/dpms.xml BASENAME dpms ) ecm_add_wayland_client_protocol(CLIENT_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/server-decoration.xml BASENAME server-decoration ) ecm_add_wayland_client_protocol(CLIENT_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/text-input.xml BASENAME text-input-v0 ) ecm_add_wayland_client_protocol(CLIENT_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/text-input-unstable-v2.xml BASENAME text-input-v2 ) ecm_add_wayland_client_protocol(CLIENT_LIB_SRCS - PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/xdg-shell-unstable-v6.xml + PROTOCOL ${WaylandProtocols_DATADIR}/unstable/xdg-shell/xdg-shell-unstable-v6.xml BASENAME xdg-shell-v6 ) ecm_add_wayland_client_protocol(CLIENT_LIB_SRCS - PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/relative-pointer-unstable-v1.xml + PROTOCOL ${WaylandProtocols_DATADIR}/unstable/relative-pointer/relative-pointer-unstable-v1.xml BASENAME relativepointer-unstable-v1 ) ecm_add_wayland_client_protocol(CLIENT_LIB_SRCS - PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/pointer-gestures-unstable-v1.xml + PROTOCOL ${WaylandProtocols_DATADIR}/unstable/pointer-gestures/pointer-gestures-unstable-v1.xml BASENAME pointer-gestures-unstable-v1 ) ecm_add_wayland_client_protocol(CLIENT_LIB_SRCS - PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/pointer-constraints-unstable-v1.xml + PROTOCOL ${WaylandProtocols_DATADIR}/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml BASENAME pointer-constraints-unstable-v1 ) ecm_add_wayland_client_protocol(CLIENT_LIB_SRCS - PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/xdg-foreign-unstable-v2.xml + PROTOCOL ${WaylandProtocols_DATADIR}/unstable/xdg-foreign/xdg-foreign-unstable-v2.xml BASENAME xdg-foreign-unstable-v2 ) ecm_add_wayland_client_protocol(CLIENT_LIB_SRCS - PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/idle-inhibit-unstable-v1.xml + PROTOCOL ${WaylandProtocols_DATADIR}/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml BASENAME idle-inhibit-unstable-v1 ) ecm_add_wayland_client_protocol(CLIENT_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/appmenu.xml BASENAME appmenu ) ecm_add_wayland_client_protocol(CLIENT_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/server-decoration-palette.xml BASENAME server-decoration-palette ) ecm_add_wayland_client_protocol(CLIENT_LIB_SRCS - PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/xdg-output-unstable-v1.xml + PROTOCOL ${WaylandProtocols_DATADIR}/unstable/xdg-output/xdg-output-unstable-v1.xml BASENAME xdg-output-unstable-v1 ) ecm_add_wayland_client_protocol(CLIENT_LIB_SRCS - PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/xdg-shell.xml + PROTOCOL ${WaylandProtocols_DATADIR}/stable/xdg-shell/xdg-shell.xml BASENAME xdg-shell ) ecm_add_wayland_client_protocol(CLIENT_LIB_SRCS - PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/xdg-decoration-unstable-v1.xml + PROTOCOL ${WaylandProtocols_DATADIR}/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml BASENAME xdg-decoration-unstable-v1 ) ecm_add_wayland_client_protocol(CLIENT_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/keystate.xml BASENAME keystate ) set(CLIENT_GENERATED_FILES ${CMAKE_CURRENT_BINARY_DIR}/wayland-fullscreen-shell-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-output-management-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-org_kde_kwin_outputdevice-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-plasma-shell-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-plasma-shell-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-plasma-window-management-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-idle-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-fake-input-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-shadow-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-blur-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-contrast-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-slide-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-dpms-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-server-decoration-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-server-decoration-palette-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-text-input-v0-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-text-input-v2-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-xdg-shell-v6-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-relativepointer-unstable-v1-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-pointer-gestures-unstable-v1-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-pointer-constraints-unstable-v1-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-xdg-foreign-unstable-v2-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-idle-inhibit-unstable-v1-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-xdg-output-unstable-v1-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-xdg-decoration-unstable-v1-client-protocol.h ) set_source_files_properties(${CLIENT_GENERATED_FILES} PROPERTIES SKIP_AUTOMOC ON) ecm_add_wayland_client_protocol(CLIENT_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/remote-access.xml BASENAME remote-access ) add_library(KF5WaylandClient ${CLIENT_LIB_SRCS}) generate_export_header(KF5WaylandClient BASE_NAME KWaylandClient EXPORT_FILE_NAME KWayland/Client/kwaylandclient_export.h ) add_library(KF5::WaylandClient ALIAS KF5WaylandClient) target_include_directories(KF5WaylandClient INTERFACE "$") target_link_libraries(KF5WaylandClient PUBLIC Qt5::Gui PRIVATE Wayland::Client Qt5::Concurrent ) set_target_properties(KF5WaylandClient PROPERTIES VERSION ${KWAYLAND_VERSION_STRING} SOVERSION ${KWAYLAND_SOVERSION} EXPORT_NAME WaylandClient ) install(TARGETS KF5WaylandClient EXPORT KF5WaylandTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS}) set(CLIENT_LIB_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/KWayland/Client/kwaylandclient_export.h appmenu.h blur.h buffer.h compositor.h connection_thread.h contrast.h event_queue.h datadevice.h datadevicemanager.h dataoffer.h datasource.h dpms.h fakeinput.h fullscreen_shell.h idle.h idleinhibit.h keyboard.h keystate.h remote_access.h outputconfiguration.h outputmanagement.h outputdevice.h output.h pointer.h pointerconstraints.h plasmashell.h plasmavirtualdesktop.h plasmawindowmanagement.h plasmawindowmodel.h pointergestures.h region.h registry.h relativepointer.h seat.h server_decoration.h server_decoration_palette.h shadow.h shell.h shm_pool.h slide.h subcompositor.h subsurface.h surface.h touch.h textinput.h xdgdecoration.h xdgshell.h xdgforeign.h xdgoutput.h ) install(FILES ${CLIENT_LIB_HEADERS} DESTINATION ${KF5_INCLUDE_INSTALL_DIR}/KWayland/Client COMPONENT Devel ) # make available to ecm_add_qch in parent folder set(KWaylandClient_APIDOX_SRCS ${CLIENT_LIB_HEADERS} PARENT_SCOPE) include(ECMGeneratePriFile) ecm_generate_pri_file(BASE_NAME KWaylandClient LIB_NAME KF5WaylandClient DEPS "core" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}) install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR}) diff --git a/src/client/protocols/idle-inhibit-unstable-v1.xml b/src/client/protocols/idle-inhibit-unstable-v1.xml deleted file mode 100644 index 9c06cdc..0000000 --- a/src/client/protocols/idle-inhibit-unstable-v1.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - Copyright © 2015 Samsung Electronics Co., Ltd - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice (including the next - paragraph) shall be included in all copies or substantial portions of the - Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - - - - This interface permits inhibiting the idle behavior such as screen - blanking, locking, and screensaving. The client binds the idle manager - globally, then creates idle-inhibitor objects for each surface. - - Warning! The protocol described in this file is experimental and - backward incompatible changes may be made. Backward compatible changes - may be added together with the corresponding interface version bump. - Backward incompatible changes are done by bumping the version number in - the protocol and interface names and resetting the interface version. - Once the protocol is to be declared stable, the 'z' prefix and the - version number in the protocol and interface names are removed and the - interface version number is reset. - - - - - Destroy the inhibit manager. - - - - - - Create a new inhibitor object associated with the given surface. - - - - - - - - - - An idle inhibitor prevents the output that the associated surface is - visible on from being set to a state where it is not visually usable due - to lack of user interaction (e.g. blanked, dimmed, locked, set to power - save, etc.) Any screensaver processes are also blocked from displaying. - - If the surface is destroyed, unmapped, becomes occluded, loses - visibility, or otherwise becomes not visually relevant for the user, the - idle inhibitor will not be honored by the compositor; if the surface - subsequently regains visibility the inhibitor takes effect once again. - Likewise, the inhibitor isn't honored if the system was already idled at - the time the inhibitor was established, although if the system later - de-idles and re-idles the inhibitor will take effect. - - - - - Remove the inhibitor effect from the associated wl_surface. - - - - - diff --git a/src/client/protocols/pointer-constraints-unstable-v1.xml b/src/client/protocols/pointer-constraints-unstable-v1.xml deleted file mode 100644 index 6fca84a..0000000 --- a/src/client/protocols/pointer-constraints-unstable-v1.xml +++ /dev/null @@ -1,344 +0,0 @@ - - - - - Copyright © 2014 Jonas Ådahl - Copyright © 2015 Red Hat Inc. - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice (including the next - paragraph) shall be included in all copies or substantial portions of the - Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - - - This protocol specifies a set of interfaces used for adding constraints to - the motion of a pointer. Possible constraints include confining pointer - motions to a given region, or locking it to its current position. - - In order to constrain the pointer, a client must first bind the global - interface "wp_pointer_constraints" which, if a compositor supports pointer - constraints, is exposed by the registry. Using the bound global object, the - client uses the request that corresponds to the type of constraint it wants - to make. See wp_pointer_constraints for more details. - - Warning! The protocol described in this file is experimental and backward - incompatible changes may be made. Backward compatible changes may be added - together with the corresponding interface version bump. Backward - incompatible changes are done by bumping the version number in the protocol - and interface names and resetting the interface version. Once the protocol - is to be declared stable, the 'z' prefix and the version number in the - protocol and interface names are removed and the interface version number is - reset. - - - - - The global interface exposing pointer constraining functionality. It - exposes two requests: lock_pointer for locking the pointer to its - position, and confine_pointer for locking the pointer to a region. - - The lock_pointer and confine_pointer requests create the objects - wp_locked_pointer and wp_confined_pointer respectively, and the client can - use these objects to interact with the lock. - - For any surface, only one lock or confinement may be active across all - wl_pointer objects of the same seat. If a lock or confinement is requested - when another lock or confinement is active or requested on the same surface - and with any of the wl_pointer objects of the same seat, an - 'already_constrained' error will be raised. - - - - - These errors can be emitted in response to wp_pointer_constraints - requests. - - - - - - - These values represent different lifetime semantics. They are passed - as arguments to the factory requests to specify how the constraint - lifetimes should be managed. - - - - A oneshot pointer constraint will never reactivate once it has been - deactivated. See the corresponding deactivation event - (wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) for - details. - - - - - A persistent pointer constraint may again reactivate once it has - been deactivated. See the corresponding deactivation event - (wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) for - details. - - - - - - - Used by the client to notify the server that it will no longer use this - pointer constraints object. - - - - - - The lock_pointer request lets the client request to disable movements of - the virtual pointer (i.e. the cursor), effectively locking the pointer - to a position. This request may not take effect immediately; in the - future, when the compositor deems implementation-specific constraints - are satisfied, the pointer lock will be activated and the compositor - sends a locked event. - - The protocol provides no guarantee that the constraints are ever - satisfied, and does not require the compositor to send an error if the - constraints cannot ever be satisfied. It is thus possible to request a - lock that will never activate. - - There may not be another pointer constraint of any kind requested or - active on the surface for any of the wl_pointer objects of the seat of - the passed pointer when requesting a lock. If there is, an error will be - raised. See general pointer lock documentation for more details. - - The intersection of the region passed with this request and the input - region of the surface is used to determine where the pointer must be - in order for the lock to activate. It is up to the compositor whether to - warp the pointer or require some kind of user interaction for the lock - to activate. If the region is null the surface input region is used. - - A surface may receive pointer focus without the lock being activated. - - The request creates a new object wp_locked_pointer which is used to - interact with the lock as well as receive updates about its state. See - the description of wp_locked_pointer for further information. - - Note that while a pointer is locked, the wl_pointer objects of the - corresponding seat will not emit any wl_pointer.motion events, but - relative motion events will still be emitted via wp_relative_pointer - objects of the same seat. wl_pointer.axis and wl_pointer.button events - are unaffected. - - - - - - - - - - - - The confine_pointer request lets the client request to confine the - pointer cursor to a given region. This request may not take effect - immediately; in the future, when the compositor deems implementation- - specific constraints are satisfied, the pointer confinement will be - activated and the compositor sends a confined event. - - The intersection of the region passed with this request and the input - region of the surface is used to determine where the pointer must be - in order for the confinement to activate. It is up to the compositor - whether to warp the pointer or require some kind of user interaction for - the confinement to activate. If the region is null the surface input - region is used. - - The request will create a new object wp_confined_pointer which is used - to interact with the confinement as well as receive updates about its - state. See the description of wp_confined_pointer for further - information. - - - - - - - - - - - - - The wp_locked_pointer interface represents a locked pointer state. - - While the lock of this object is active, the wl_pointer objects of the - associated seat will not emit any wl_pointer.motion events. - - This object will send the event 'locked' when the lock is activated. - Whenever the lock is activated, it is guaranteed that the locked surface - will already have received pointer focus and that the pointer will be - within the region passed to the request creating this object. - - To unlock the pointer, send the destroy request. This will also destroy - the wp_locked_pointer object. - - If the compositor decides to unlock the pointer the unlocked event is - sent. See wp_locked_pointer.unlock for details. - - When unlocking, the compositor may warp the cursor position to the set - cursor position hint. If it does, it will not result in any relative - motion events emitted via wp_relative_pointer. - - If the surface the lock was requested on is destroyed and the lock is not - yet activated, the wp_locked_pointer object is now defunct and must be - destroyed. - - - - - Destroy the locked pointer object. If applicable, the compositor will - unlock the pointer. - - - - - - Set the cursor position hint relative to the top left corner of the - surface. - - If the client is drawing its own cursor, it should update the position - hint to the position of its own cursor. A compositor may use this - information to warp the pointer upon unlock in order to avoid pointer - jumps. - - The cursor position hint is double buffered. The new hint will only take - effect when the associated surface gets it pending state applied. See - wl_surface.commit for details. - - - - - - - - - Set a new region used to lock the pointer. - - The new lock region is double-buffered. The new lock region will - only take effect when the associated surface gets its pending state - applied. See wl_surface.commit for details. - - For details about the lock region, see wp_locked_pointer. - - - - - - - - Notification that the pointer lock of the seat's pointer is activated. - - - - - - Notification that the pointer lock of the seat's pointer is no longer - active. If this is a oneshot pointer lock (see - wp_pointer_constraints.lifetime) this object is now defunct and should - be destroyed. If this is a persistent pointer lock (see - wp_pointer_constraints.lifetime) this pointer lock may again - reactivate in the future. - - - - - - - The wp_confined_pointer interface represents a confined pointer state. - - This object will send the event 'confined' when the confinement is - activated. Whenever the confinement is activated, it is guaranteed that - the surface the pointer is confined to will already have received pointer - focus and that the pointer will be within the region passed to the request - creating this object. It is up to the compositor to decide whether this - requires some user interaction and if the pointer will warp to within the - passed region if outside. - - To unconfine the pointer, send the destroy request. This will also destroy - the wp_confined_pointer object. - - If the compositor decides to unconfine the pointer the unconfined event is - sent. The wp_confined_pointer object is at this point defunct and should - be destroyed. - - - - - Destroy the confined pointer object. If applicable, the compositor will - unconfine the pointer. - - - - - - Set a new region used to confine the pointer. - - The new confine region is double-buffered. The new confine region will - only take effect when the associated surface gets its pending state - applied. See wl_surface.commit for details. - - If the confinement is active when the new confinement region is applied - and the pointer ends up outside of newly applied region, the pointer may - warped to a position within the new confinement region. If warped, a - wl_pointer.motion event will be emitted, but no - wp_relative_pointer.relative_motion event. - - The compositor may also, instead of using the new region, unconfine the - pointer. - - For details about the confine region, see wp_confined_pointer. - - - - - - - - Notification that the pointer confinement of the seat's pointer is - activated. - - - - - - Notification that the pointer confinement of the seat's pointer is no - longer active. If this is a oneshot pointer confinement (see - wp_pointer_constraints.lifetime) this object is now defunct and should - be destroyed. If this is a persistent pointer confinement (see - wp_pointer_constraints.lifetime) this pointer confinement may again - reactivate in the future. - - - - - diff --git a/src/client/protocols/pointer-gestures-unstable-v1.xml b/src/client/protocols/pointer-gestures-unstable-v1.xml deleted file mode 100644 index 5b7132c..0000000 --- a/src/client/protocols/pointer-gestures-unstable-v1.xml +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - A global interface to provide semantic touchpad gestures for a given - pointer. - - Two gestures are currently supported: swipe and zoom/rotate. - All gestures follow a three-stage cycle: begin, update, end and - are identified by a unique id. - - Warning! The protocol described in this file is experimental and - backward incompatible changes may be made. Backward compatible changes - may be added together with the corresponding interface version bump. - Backward incompatible changes are done by bumping the version number in - the protocol and interface names and resetting the interface version. - Once the protocol is to be declared stable, the 'z' prefix and the - version number in the protocol and interface names are removed and the - interface version number is reset. - - - - - Create a swipe gesture object. See the - wl_pointer_gesture_swipe interface for details. - - - - - - - - Create a pinch gesture object. See the - wl_pointer_gesture_pinch interface for details. - - - - - - - - - A swipe gesture object notifies a client about a multi-finger swipe - gesture detected on an indirect input device such as a touchpad. - The gesture is usually initiated by multiple fingers moving in the - same direction but once initiated the direction may change. - The precise conditions of when such a gesture is detected are - implementation-dependent. - - A gesture consists of three stages: begin, update (optional) and end. - There cannot be multiple simultaneous pinch or swipe gestures on a - same pointer/seat, how compositors prevent these situations is - implementation-dependent. - - A gesture may be cancelled by the compositor or the hardware. - Clients should not consider performing permanent or irreversible - actions until the end of a gesture has been received. - - - - - - - - - This event is sent when a multi-finger swipe gesture is detected - on the device. - - - - - - - - - - This event is sent when a multi-finger swipe gesture changes the - position of the logical center. - - The dx and dy coordinates are relative coordinates of the logical - center of the gesture compared to the previous event. - - - - - - - - - This event is sent when a multi-finger swipe gesture ceases to - be valid. This may happen when one or more fingers are lifted or - the gesture is cancelled. - - When a gesture is cancelled, the client should undo state changes - caused by this gesture. What causes a gesture to be cancelled is - implementation-dependent. - - - - - - - - - - A pinch gesture object notifies a client about a multi-finger pinch - gesture detected on an indirect input device such as a touchpad. - The gesture is usually initiated by multiple fingers moving towards - each other or away from each other, or by two or more fingers rotating - around a logical center of gravity. The precise conditions of when - such a gesture is detected are implementation-dependent. - - A gesture consists of three stages: begin, update (optional) and end. - There cannot be multiple simultaneous pinch or swipe gestures on a - same pointer/seat, how compositors prevent these situations is - implementation-dependent. - - A gesture may be cancelled by the compositor or the hardware. - Clients should not consider performing permanent or irreversible - actions until the end of a gesture has been received. - - - - - - - - - This event is sent when a multi-finger pinch gesture is detected - on the device. - - - - - - - - - - This event is sent when a multi-finger pinch gesture changes the - position of the logical center, the rotation or the relative scale. - - The dx and dy coordinates are relative coordinates in the - surface coordinate space of the logical center of the gesture. - - The scale factor is an absolute scale compared to the - pointer_gesture_pinch.begin event, e.g. a scale of 2 means the fingers - are now twice as far apart as on pointer_gesture_pinch.begin. - - The rotation is the relative angle in degrees clockwise compared to the previous - pointer_gesture_pinch.begin or pointer_gesture_pinch.update event. - - - - - - - - - - - This event is sent when a multi-finger pinch gesture ceases to - be valid. This may happen when one or more fingers are lifted or - the gesture is cancelled. - - When a gesture is cancelled, the client should undo state changes - caused by this gesture. What causes a gesture to be cancelled is - implementation-dependent. - - - - - - - - diff --git a/src/client/protocols/relative-pointer-unstable-v1.xml b/src/client/protocols/relative-pointer-unstable-v1.xml deleted file mode 100644 index 24935a3..0000000 --- a/src/client/protocols/relative-pointer-unstable-v1.xml +++ /dev/null @@ -1,138 +0,0 @@ - - - - - Copyright © 2014 Jonas Ådahl - Copyright © 2015 Red Hat Inc. - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice (including the next - paragraph) shall be included in all copies or substantial portions of the - Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - - - This protocol specifies a set of interfaces used for making clients able to - receive relative pointer events not obstructed by barriers (such as the - monitor edge or other pointer barriers). - - To start receiving relative pointer events, a client must first bind the - global interface "wp_relative_pointer_manager" which, if a compositor - supports relative pointer motion events, is exposed by the registry. After - having created the relative pointer manager proxy object, the client uses - it to create the actual relative pointer object using the - "get_relative_pointer" request given a wl_pointer. The relative pointer - motion events will then, when applicable, be transmitted via the proxy of - the newly created relative pointer object. See the documentation of the - relative pointer interface for more details. - - Warning! The protocol described in this file is experimental and backward - incompatible changes may be made. Backward compatible changes may be added - together with the corresponding interface version bump. Backward - incompatible changes are done by bumping the version number in the protocol - and interface names and resetting the interface version. Once the protocol - is to be declared stable, the 'z' prefix and the version number in the - protocol and interface names are removed and the interface version number is - reset. - - - - - A global interface used for getting the relative pointer object for a - given pointer. - - - - - Used by the client to notify the server that it will no longer use this - relative pointer manager object. - - - - - - Create a relative pointer interface given a wl_pointer object. See the - wp_relative_pointer interface for more details. - - - - - - - - - - A wp_relative_pointer object is an extension to the wl_pointer interface - used for emitting relative pointer events. It shares the same focus as - wl_pointer objects of the same seat and will only emit events when it has - focus. - - - - - - - - - Relative x/y pointer motion from the pointer of the seat associated with - this object. - - A relative motion is in the same dimension as regular wl_pointer motion - events, except they do not represent an absolute position. For example, - moving a pointer from (x, y) to (x', y') would have the equivalent - relative motion (x' - x, y' - y). If a pointer motion caused the - absolute pointer position to be clipped by for example the edge of the - monitor, the relative motion is unaffected by the clipping and will - represent the unclipped motion. - - This event also contains non-accelerated motion deltas. The - non-accelerated delta is, when applicable, the regular pointer motion - delta as it was before having applied motion acceleration and other - transformations such as normalization. - - Note that the non-accelerated delta does not represent 'raw' events as - they were read from some device. Pointer motion acceleration is device- - and configuration-specific and non-accelerated deltas and accelerated - deltas may have the same value on some devices. - - Relative motions are not coupled to wl_pointer.motion events, and can be - sent in combination with such events, but also independently. There may - also be scenarios where wl_pointer.motion is sent, but there is no - relative motion. The order of an absolute and relative motion event - originating from the same physical motion is not guaranteed. - - If the client needs button events or focus state, it can receive them - from a wl_pointer object of the same seat that the wp_relative_pointer - object is associated with. - - - - - - - - - - - - diff --git a/src/client/protocols/xdg-decoration-unstable-v1.xml b/src/client/protocols/xdg-decoration-unstable-v1.xml deleted file mode 100644 index 378e8ff..0000000 --- a/src/client/protocols/xdg-decoration-unstable-v1.xml +++ /dev/null @@ -1,156 +0,0 @@ - - - - Copyright © 2018 Simon Ser - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice (including the next - paragraph) shall be included in all copies or substantial portions of the - Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - - - - This interface allows a compositor to announce support for server-side - decorations. - - A window decoration is a set of window controls as deemed appropriate by - the party managing them, such as user interface components used to move, - resize and change a window's state. - - A client can use this protocol to request being decorated by a supporting - compositor. - - If compositor and client do not negotiate the use of a server-side - decoration using this protocol, clients continue to self-decorate as they - see fit. - - Warning! The protocol described in this file is experimental and - backward incompatible changes may be made. Backward compatible changes - may be added together with the corresponding interface version bump. - Backward incompatible changes are done by bumping the version number in - the protocol and interface names and resetting the interface version. - Once the protocol is to be declared stable, the 'z' prefix and the - version number in the protocol and interface names are removed and the - interface version number is reset. - - - - - Destroy the decoration manager. This doesn't destroy objects created - with the manager. - - - - - - Create a new decoration object associated with the given toplevel. - - Creating an xdg_toplevel_decoration from an xdg_toplevel which has a - buffer attached or committed is a client error, and any attempts by a - client to attach or manipulate a buffer prior to the first - xdg_toplevel_decoration.configure event must also be treated as - errors. - - - - - - - - - The decoration object allows the compositor to toggle server-side window - decorations for a toplevel surface. The client can request to switch to - another mode. - - The xdg_toplevel_decoration object must be destroyed before its - xdg_toplevel. - - - - - - - - - - - Switch back to a mode without any server-side decorations at the next - commit. - - - - - - These values describe window decoration modes. - - - - - - - - Set the toplevel surface decoration mode. This informs the compositor - that the client prefers the provided decoration mode. - - After requesting a decoration mode, the compositor will respond by - emitting a xdg_surface.configure event. The client should then update - its content, drawing it without decorations if the received mode is - server-side decorations. The client must also acknowledge the configure - when committing the new content (see xdg_surface.ack_configure). - - The compositor can decide not to use the client's mode and enforce a - different mode instead. - - Clients whose decoration mode depend on the xdg_toplevel state may send - a set_mode request in response to a xdg_surface.configure event and wait - for the next xdg_surface.configure event to prevent unwanted state. - Such clients are responsible for preventing configure loops and must - make sure not to send multiple successive set_mode requests with the - same decoration mode. - - - - - - - Unset the toplevel surface decoration mode. This informs the compositor - that the client doesn't prefer a particular decoration mode. - - This request has the same semantics as set_mode. - - - - - - The configure event asks the client to change its decoration mode. The - configured state should not be applied immediately. Clients must send an - ack_configure in response to this event. See xdg_surface.configure and - xdg_surface.ack_configure for details. - - A configure event can be sent at any time. The specified mode must be - obeyed by the client. - - - - - diff --git a/src/client/protocols/xdg-foreign-unstable-v2.xml b/src/client/protocols/xdg-foreign-unstable-v2.xml deleted file mode 100644 index bf46fa8..0000000 --- a/src/client/protocols/xdg-foreign-unstable-v2.xml +++ /dev/null @@ -1,182 +0,0 @@ - - - - - Copyright © 2015-2016 Red Hat Inc. - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice (including the next - paragraph) shall be included in all copies or substantial portions of the - Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - - - This protocol specifies a way for making it possible to reference a surface - of a different client. With such a reference, a client can, by using the - interfaces provided by this protocol, manipulate the relationship between - its own surfaces and the surface of some other client. For example, stack - some of its own surface above the other clients surface. - - In order for a client A to get a reference of a surface of client B, client - B must first export its surface using xdg_exporter.export_toplevel. Upon - doing this, client B will receive a handle (a unique string) that it may - share with client A in some way (for example D-Bus). After client A has - received the handle from client B, it may use xdg_importer.import_toplevel - to create a reference to the surface client B just exported. See the - corresponding requests for details. - - A possible use case for this is out-of-process dialogs. For example when a - sandboxed client without file system access needs the user to select a file - on the file system, given sandbox environment support, it can export its - surface, passing the exported surface handle to an unsandboxed process that - can show a file browser dialog and stack it above the sandboxed client's - surface. - - Warning! The protocol described in this file is experimental and backward - incompatible changes may be made. Backward compatible changes may be added - together with the corresponding interface version bump. Backward - incompatible changes are done by bumping the version number in the protocol - and interface names and resetting the interface version. Once the protocol - is to be declared stable, the 'z' prefix and the version number in the - protocol and interface names are removed and the interface version number is - reset. - - - - - A global interface used for exporting surfaces that can later be imported - using xdg_importer. - - - - - Notify the compositor that the xdg_exporter object will no longer be - used. - - - - - - The export_toplevel request exports the passed surface so that it can later be - imported via xdg_importer. When called, a new xdg_exported object will - be created and xdg_exported.handle will be sent immediately. See the - corresponding interface and event for details. - - A surface may be exported multiple times, and each exported handle may - be used to create a xdg_imported multiple times. Only xdg_toplevel - equivalent surfaces may be exported. - - - - - - - - - A global interface used for importing surfaces exported by xdg_exporter. - With this interface, a client can create a reference to a surface of - another client. - - - - - Notify the compositor that the xdg_importer object will no longer be - used. - - - - - - The import_toplevel request imports a surface from any client given a handle - retrieved by exporting said surface using xdg_exporter.export_toplevel. - When called, a new xdg_imported object will be created. This new object - represents the imported surface, and the importing client can - manipulate its relationship using it. See xdg_imported for details. - - - - - - - - - A xdg_exported object represents an exported reference to a surface. The - exported surface may be referenced as long as the xdg_exported object not - destroyed. Destroying the xdg_exported invalidates any relationship the - importer may have established using xdg_imported. - - - - - Revoke the previously exported surface. This invalidates any - relationship the importer may have set up using the xdg_imported created - given the handle sent via xdg_exported.handle. - - - - - - The handle event contains the unique handle of this exported surface - reference. It may be shared with any client, which then can use it to - import the surface by calling xdg_importer.import_toplevel. A handle - may be used to import the surface multiple times. - - - - - - - - A xdg_imported object represents an imported reference to surface exported - by some client. A client can use this interface to manipulate - relationships between its own surfaces and the imported surface. - - - - - Notify the compositor that it will no longer use the xdg_imported - object. Any relationship that may have been set up will at this point - be invalidated. - - - - - - Set the imported surface as the parent of some surface of the client. - The passed surface must be a xdg_toplevel equivalent. Calling this - function sets up a surface to surface relation with the same stacking - and positioning semantics as xdg_toplevel.set_parent. - - - - - - - The imported surface handle has been destroyed and any relationship set - up has been invalidated. This may happen for various reasons, for - example if the exported surface or the exported surface handle has been - destroyed, if the handle used for importing was invalid. - - - - - diff --git a/src/client/protocols/xdg-output-unstable-v1.xml b/src/client/protocols/xdg-output-unstable-v1.xml deleted file mode 100644 index 0c0c481..0000000 --- a/src/client/protocols/xdg-output-unstable-v1.xml +++ /dev/null @@ -1,161 +0,0 @@ - - - - - Copyright © 2017 Red Hat Inc. - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice (including the next - paragraph) shall be included in all copies or substantial portions of the - Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - - - This protocol aims at describing outputs in a way which is more in line - with the concept of an output on desktop oriented systems. - - Some information are more specific to the concept of an output for - a desktop oriented system and may not make sense in other applications, - such as IVI systems for example. - - Typically, the global compositor space on a desktop system is made of - a contiguous or overlapping set of rectangular regions. - - Some of the information provided in this protocol might be identical - to their counterparts already available from wl_output, in which case - the information provided by this protocol should be preferred to their - equivalent in wl_output. The goal is to move the desktop specific - concepts (such as output location within the global compositor space, - the connector name and types, etc.) out of the core wl_output protocol. - - Warning! The protocol described in this file is experimental and - backward incompatible changes may be made. Backward compatible - changes may be added together with the corresponding interface - version bump. - Backward incompatible changes are done by bumping the version - number in the protocol and interface names and resetting the - interface version. Once the protocol is to be declared stable, - the 'z' prefix and the version number in the protocol and - interface names are removed and the interface version number is - reset. - - - - - A global factory interface for xdg_output objects. - - - - - Using this request a client can tell the server that it is not - going to use the xdg_output_manager object anymore. - - Any objects already created through this instance are not affected. - - - - - - This creates a new xdg_output object for the given wl_output. - - - - - - - - - An xdg_output describes part of the compositor geometry. - - This typically corresponds to a monitor that displays part of the - compositor space. - - - - - Using this request a client can tell the server that it is not - going to use the xdg_output object anymore. - - - - - - The position event describes the location of the wl_output within - the global compositor space. - - The logical_position event is sent after creating an xdg_output - (see xdg_output_manager.get_xdg_output) and whenever the location - of the output changes within the global compositor space. - - - - - - - - The logical_size event describes the size of the output in the - global compositor space. - - For example, a surface without any buffer scale, transformation - nor rotation set, with the size matching the logical_size will - have the same size as the corresponding output when displayed. - - Most regular Wayland clients should not pay attention to the - logical size and would rather rely on xdg_shell interfaces. - - Some clients such as Xwayland, however, need this to configure - their surfaces in the global compositor space as the compositor - may apply a different scale from what is advertised by the output - scaling property (to achieve fractional scaling, for example). - - For example, for a wl_output mode 3840×2160 and a scale factor 2: - - - A compositor not scaling the surface buffers will advertise a - logical size of 3840×2160, - - - A compositor automatically scaling the surface buffers will - advertise a logical size of 1920×1080, - - - A compositor using a fractional scale of 1.5 will advertise a - logical size to 2560×1620. - - The logical_size event is sent after creating an xdg_output - (see xdg_output_manager.get_xdg_output) and whenever the logical - size of the output changes, either as a result of a change in the - applied scale or because of a change in the corresponding output - mode(see wl_output.mode) or transform (see wl_output.transform). - - - - - - - - This event is sent after all other properties of an xdg_output - have been sent. - - This allows changes to the xdg_output properties to be seen as - atomic, even if they happen via multiple events. - - - - - diff --git a/src/client/protocols/xdg-shell-unstable-v5.xml b/src/client/protocols/xdg-shell-unstable-v5.xml deleted file mode 100644 index 542491f..0000000 --- a/src/client/protocols/xdg-shell-unstable-v5.xml +++ /dev/null @@ -1,625 +0,0 @@ - - - - - Copyright © 2008-2013 Kristian Høgsberg - Copyright © 2013 Rafael Antognolli - Copyright © 2013 Jasper St. Pierre - Copyright © 2010-2013 Intel Corporation - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice (including the next - paragraph) shall be included in all copies or substantial portions of the - Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - - - - xdg_shell allows clients to turn a wl_surface into a "real window" - which can be dragged, resized, stacked, and moved around by the - user. Everything about this interface is suited towards traditional - desktop environments. - - - - - The 'current' member of this enum gives the version of the - protocol. Implementations can compare this to the version - they implement using static_assert to ensure the protocol and - implementation versions match. - - - - - - - - - - - - - - Destroy this xdg_shell object. - - Destroying a bound xdg_shell object while there are surfaces - still alive created by this xdg_shell object instance is illegal - and will result in a protocol error. - - - - - - Negotiate the unstable version of the interface. This - mechanism is in place to ensure client and server agree on the - unstable versions of the protocol that they speak or exit - cleanly if they don't agree. This request will go away once - the xdg-shell protocol is stable. - - - - - - - This creates an xdg_surface for the given surface and gives it the - xdg_surface role. A wl_surface can only be given an xdg_surface role - once. If get_xdg_surface is called with a wl_surface that already has - an active xdg_surface associated with it, or if it had any other role, - an error is raised. - - See the documentation of xdg_surface for more details about what an - xdg_surface is and how it is used. - - - - - - - - This creates an xdg_popup for the given surface and gives it the - xdg_popup role. A wl_surface can only be given an xdg_popup role - once. If get_xdg_popup is called with a wl_surface that already has - an active xdg_popup associated with it, or if it had any other role, - an error is raised. - - This request must be used in response to some sort of user action - like a button press, key press, or touch down event. - - See the documentation of xdg_popup for more details about what an - xdg_popup is and how it is used. - - - - - - - - - - - - - The ping event asks the client if it's still alive. Pass the - serial specified in the event back to the compositor by sending - a "pong" request back with the specified serial. - - Compositors can use this to determine if the client is still - alive. It's unspecified what will happen if the client doesn't - respond to the ping request, or in what timeframe. Clients should - try to respond in a reasonable amount of time. - - A compositor is free to ping in any way it wants, but a client must - always respond to any xdg_shell object it created. - - - - - - - A client must respond to a ping event with a pong request or - the client may be deemed unresponsive. - - - - - - - - An interface that may be implemented by a wl_surface, for - implementations that provide a desktop-style user interface. - - It provides requests to treat surfaces like windows, allowing to set - properties like maximized, fullscreen, minimized, and to move and resize - them, and associate metadata like title and app id. - - The client must call wl_surface.commit on the corresponding wl_surface - for the xdg_surface state to take effect. Prior to committing the new - state, it can set up initial configuration, such as maximizing or setting - a window geometry. - - Even without attaching a buffer the compositor must respond to initial - committed configuration, for instance sending a configure event with - expected window geometry if the client maximized its surface during - initialization. - - For a surface to be mapped by the compositor the client must have - committed both an xdg_surface state and a buffer. - - - - - Unmap and destroy the window. The window will be effectively - hidden from the user's point of view, and all state like - maximization, fullscreen, and so on, will be lost. - - - - - - Set the "parent" of this surface. This window should be stacked - above a parent. The parent surface must be mapped as long as this - surface is mapped. - - Parent windows should be set on dialogs, toolboxes, or other - "auxiliary" surfaces, so that the parent is raised when the dialog - is raised. - - - - - - - Set a short title for the surface. - - This string may be used to identify the surface in a task bar, - window list, or other user interface elements provided by the - compositor. - - The string must be encoded in UTF-8. - - - - - - - Set an application identifier for the surface. - - The app ID identifies the general class of applications to which - the surface belongs. The compositor can use this to group multiple - surfaces together, or to determine how to launch a new application. - - For D-Bus activatable applications, the app ID is used as the D-Bus - service name. - - The compositor shell will try to group application surfaces together - by their app ID. As a best practice, it is suggested to select app - ID's that match the basename of the application's .desktop file. - For example, "org.freedesktop.FooViewer" where the .desktop file is - "org.freedesktop.FooViewer.desktop". - - See the desktop-entry specification [0] for more details on - application identifiers and how they relate to well-known D-Bus - names and .desktop files. - - [0] http://standards.freedesktop.org/desktop-entry-spec/ - - - - - - - Clients implementing client-side decorations might want to show - a context menu when right-clicking on the decorations, giving the - user a menu that they can use to maximize or minimize the window. - - This request asks the compositor to pop up such a window menu at - the given position, relative to the local surface coordinates of - the parent surface. There are no guarantees as to what menu items - the window menu contains. - - This request must be used in response to some sort of user action - like a button press, key press, or touch down event. - - - - - - - - - - - Start an interactive, user-driven move of the surface. - - This request must be used in response to some sort of user action - like a button press, key press, or touch down event. The passed - serial is used to determine the type of interactive move (touch, - pointer, etc). - - The server may ignore move requests depending on the state of - the surface (e.g. fullscreen or maximized), or if the passed serial - is no longer valid. - - If triggered, the surface will lose the focus of the device - (wl_pointer, wl_touch, etc) used for the move. It is up to the - compositor to visually indicate that the move is taking place, such as - updating a pointer cursor, during the move. There is no guarantee - that the device focus will return when the move is completed. - - - - - - - - These values are used to indicate which edge of a surface - is being dragged in a resize operation. - - - - - - - - - - - - - - - Start a user-driven, interactive resize of the surface. - - This request must be used in response to some sort of user action - like a button press, key press, or touch down event. The passed - serial is used to determine the type of interactive resize (touch, - pointer, etc). - - The server may ignore resize requests depending on the state of - the surface (e.g. fullscreen or maximized). - - If triggered, the client will receive configure events with the - "resize" state enum value and the expected sizes. See the "resize" - enum value for more details about what is required. The client - must also acknowledge configure events using "ack_configure". After - the resize is completed, the client will receive another "configure" - event without the resize state. - - If triggered, the surface also will lose the focus of the device - (wl_pointer, wl_touch, etc) used for the resize. It is up to the - compositor to visually indicate that the resize is taking place, - such as updating a pointer cursor, during the resize. There is no - guarantee that the device focus will return when the resize is - completed. - - The edges parameter specifies how the surface should be resized, - and is one of the values of the resize_edge enum. The compositor - may use this information to update the surface position for - example when dragging the top left corner. The compositor may also - use this information to adapt its behavior, e.g. choose an - appropriate cursor image. - - - - - - - - - The different state values used on the surface. This is designed for - state values like maximized, fullscreen. It is paired with the - configure event to ensure that both the client and the compositor - setting the state can be synchronized. - - States set in this way are double-buffered. They will get applied on - the next commit. - - Desktop environments may extend this enum by taking up a range of - values and documenting the range they chose in this description. - They are not required to document the values for the range that they - chose. Ideally, any good extensions from a desktop environment should - make its way into standardization into this enum. - - The current reserved ranges are: - - 0x0000 - 0x0FFF: xdg-shell core values, documented below. - 0x1000 - 0x1FFF: GNOME - 0x2000 - 0x2FFF: EFL - - - - The surface is maximized. The window geometry specified in the configure - event must be obeyed by the client. - - - - - The surface is fullscreen. The window geometry specified in the configure - event must be obeyed by the client. - - - - - The surface is being resized. The window geometry specified in the - configure event is a maximum; the client cannot resize beyond it. - Clients that have aspect ratio or cell sizing configuration can use - a smaller size, however. - - - - - Client window decorations should be painted as if the window is - active. Do not assume this means that the window actually has - keyboard or pointer focus. - - - - - - - The configure event asks the client to resize its surface or to - change its state. - - The width and height arguments specify a hint to the window - about how its surface should be resized in window geometry - coordinates. See set_window_geometry. - - If the width or height arguments are zero, it means the client - should decide its own window dimension. This may happen when the - compositor need to configure the state of the surface but doesn't - have any information about any previous or expected dimension. - - The states listed in the event specify how the width/height - arguments should be interpreted, and possibly how it should be - drawn. - - Clients should arrange their surface for the new size and - states, and then send a ack_configure request with the serial - sent in this configure event at some point before committing - the new surface. - - If the client receives multiple configure events before it - can respond to one, it is free to discard all but the last - event it received. - - - - - - - - - - - When a configure event is received, if a client commits the - surface in response to the configure event, then the client - must make an ack_configure request sometime before the commit - request, passing along the serial of the configure event. - - For instance, the compositor might use this information to move - a surface to the top left only when the client has drawn itself - for the maximized or fullscreen state. - - If the client receives multiple configure events before it - can respond to one, it only has to ack the last configure event. - - A client is not required to commit immediately after sending - an ack_configure request - it may even ack_configure several times - before its next surface commit. - - The compositor expects that the most recently received - ack_configure request at the time of a commit indicates which - configure event the client is responding to. - - - - - - - The window geometry of a window is its "visible bounds" from the - user's perspective. Client-side decorations often have invisible - portions like drop-shadows which should be ignored for the - purposes of aligning, placing and constraining windows. - - The window geometry is double buffered, and will be applied at the - time wl_surface.commit of the corresponding wl_surface is called. - - Once the window geometry of the surface is set once, it is not - possible to unset it, and it will remain the same until - set_window_geometry is called again, even if a new subsurface or - buffer is attached. - - If never set, the value is the full bounds of the surface, - including any subsurfaces. This updates dynamically on every - commit. This unset mode is meant for extremely simple clients. - - If responding to a configure event, the window geometry in here - must respect the sizing negotiations specified by the states in - the configure event. - - The arguments are given in the surface local coordinate space of - the wl_surface associated with this xdg_surface. - - The width and height must be greater than zero. - - - - - - - - - - Maximize the surface. - - After requesting that the surface should be maximized, the compositor - will respond by emitting a configure event with the "maximized" state - and the required window geometry. The client should then update its - content, drawing it in a maximized state, i.e. without shadow or other - decoration outside of the window geometry. The client must also - acknowledge the configure when committing the new content (see - ack_configure). - - It is up to the compositor to decide how and where to maximize the - surface, for example which output and what region of the screen should - be used. - - If the surface was already maximized, the compositor will still emit - a configure event with the "maximized" state. - - - - - - Unmaximize the surface. - - After requesting that the surface should be unmaximized, the compositor - will respond by emitting a configure event without the "maximized" - state. If available, the compositor will include the window geometry - dimensions the window had prior to being maximized in the configure - request. The client must then update its content, drawing it in a - regular state, i.e. potentially with shadow, etc. The client must also - acknowledge the configure when committing the new content (see - ack_configure). - - It is up to the compositor to position the surface after it was - unmaximized; usually the position the surface had before maximizing, if - applicable. - - If the surface was already not maximized, the compositor will still - emit a configure event without the "maximized" state. - - - - - - Make the surface fullscreen. - - You can specify an output that you would prefer to be fullscreen. - If this value is NULL, it's up to the compositor to choose which - display will be used to map this surface. - - If the surface doesn't cover the whole output, the compositor will - position the surface in the center of the output and compensate with - black borders filling the rest of the output. - - - - - - - - Request that the compositor minimize your surface. There is no - way to know if the surface is currently minimized, nor is there - any way to unset minimization on this surface. - - If you are looking to throttle redrawing when minimized, please - instead use the wl_surface.frame event for this, as this will - also work with live previews on windows in Alt-Tab, Expose or - similar compositor features. - - - - - - The close event is sent by the compositor when the user - wants the surface to be closed. This should be equivalent to - the user clicking the close button in client-side decorations, - if your application has any... - - This is only a request that the user intends to close your - window. The client may choose to ignore this request, or show - a dialog to ask the user to save their data... - - - - - - - A popup surface is a short-lived, temporary surface that can be - used to implement menus. It takes an explicit grab on the surface - that will be dismissed when the user dismisses the popup. This can - be done by the user clicking outside the surface, using the keyboard, - or even locking the screen through closing the lid or a timeout. - - When the popup is dismissed, a popup_done event will be sent out, - and at the same time the surface will be unmapped. The xdg_popup - object is now inert and cannot be reactivated, so clients should - destroy it. Explicitly destroying the xdg_popup object will also - dismiss the popup and unmap the surface. - - Clients will receive events for all their surfaces during this - grab (which is an "owner-events" grab in X11 parlance). This is - done so that users can navigate through submenus and other - "nested" popup windows without having to dismiss the topmost - popup. - - Clients that want to dismiss the popup when another surface of - their own is clicked should dismiss the popup using the destroy - request. - - The parent surface must have either an xdg_surface or xdg_popup - role. - - Specifying an xdg_popup for the parent means that the popups are - nested, with this popup now being the topmost popup. Nested - popups must be destroyed in the reverse order they were created - in, e.g. the only popup you are allowed to destroy at all times - is the topmost one. - - If there is an existing popup when creating a new popup, the - parent must be the current topmost popup. - - A parent surface must be mapped before the new popup is mapped. - - When compositors choose to dismiss a popup, they will likely - dismiss every nested popup as well. When a compositor dismisses - popups, it will follow the same dismissing order as required - from the client. - - The x and y arguments passed when creating the popup object specify - where the top left of the popup should be placed, relative to the - local surface coordinates of the parent surface. See - xdg_shell.get_xdg_popup. - - The client must call wl_surface.commit on the corresponding wl_surface - for the xdg_popup state to take effect. - - For a surface to be mapped by the compositor the client must have - committed both the xdg_popup state and a buffer. - - - - - This destroys the popup. Explicitly destroying the xdg_popup - object will also dismiss the popup, and unmap the surface. - - If this xdg_popup is not the "topmost" popup, a protocol error - will be sent. - - - - - - The popup_done event is sent out when a popup is dismissed by the - compositor. The client should destroy the xdg_popup object at this - point. - - - - - diff --git a/src/client/protocols/xdg-shell-unstable-v6.xml b/src/client/protocols/xdg-shell-unstable-v6.xml deleted file mode 100644 index 1c0f924..0000000 --- a/src/client/protocols/xdg-shell-unstable-v6.xml +++ /dev/null @@ -1,1044 +0,0 @@ - - - - - Copyright © 2008-2013 Kristian Høgsberg - Copyright © 2013 Rafael Antognolli - Copyright © 2013 Jasper St. Pierre - Copyright © 2010-2013 Intel Corporation - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice (including the next - paragraph) shall be included in all copies or substantial portions of the - Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - - - - xdg_shell allows clients to turn a wl_surface into a "real window" - which can be dragged, resized, stacked, and moved around by the - user. Everything about this interface is suited towards traditional - desktop environments. - - - - - - - - - - - - - - Destroy this xdg_shell object. - - Destroying a bound xdg_shell object while there are surfaces - still alive created by this xdg_shell object instance is illegal - and will result in a protocol error. - - - - - - Create a positioner object. A positioner object is used to position - surfaces relative to some parent surface. See the interface description - and xdg_surface.get_popup for details. - - - - - - - This creates an xdg_surface for the given surface. While xdg_surface - itself is not a role, the corresponding surface may only be assigned - a role extending xdg_surface, such as xdg_toplevel or xdg_popup. - - This creates an xdg_surface for the given surface. An xdg_surface is - used as basis to define a role to a given surface, such as xdg_toplevel - or xdg_popup. It also manages functionality shared between xdg_surface - based surface roles. - - See the documentation of xdg_surface for more details about what an - xdg_surface is and how it is used. - - - - - - - - A client must respond to a ping event with a pong request or - the client may be deemed unresponsive. See xdg_shell.ping. - - - - - - - The ping event asks the client if it's still alive. Pass the - serial specified in the event back to the compositor by sending - a "pong" request back with the specified serial. See xdg_shell.ping. - - Compositors can use this to determine if the client is still - alive. It's unspecified what will happen if the client doesn't - respond to the ping request, or in what timeframe. Clients should - try to respond in a reasonable amount of time. - - A compositor is free to ping in any way it wants, but a client must - always respond to any xdg_shell object it created. - - - - - - - - The xdg_positioner provides a collection of rules for the placement of a - child surface relative to a parent surface. Rules can be defined to ensure - the child surface remains within the visible area's borders, and to - specify how the child surface changes its position, such as sliding along - an axis, or flipping around a rectangle. These positioner-created rules are - constrained by the requirement that a child surface must intersect with or - be at least partially adjacent to its parent surface. - - See the various requests for details about possible rules. - - At the time of the request, the compositor makes a copy of the rules - specified by the xdg_positioner. Thus, after the request is complete the - xdg_positioner object can be destroyed or reused; further changes to the - object will have no effect on previous usages. - - For an xdg_positioner object to be considered complete, it must have a - non-zero size set by set_size, and a non-zero anchor rectangle set by - set_anchor_rect. Passing an incomplete xdg_positioner object when - positioning a surface raises an error. - - - - - - - - - Notify the compositor that the xdg_positioner will no longer be used. - - - - - - Set the size of the surface that is to be positioned with the positioner - object. The size is in surface-local coordinates and corresponds to the - window geometry. See xdg_surface.set_window_geometry. - - If a zero or negative size is set the invalid_input error is raised. - - - - - - - - Specify the anchor rectangle within the parent surface that the child - surface will be placed relative to. The rectangle is relative to the - window geometry as defined by xdg_surface.set_window_geometry of the - parent surface. The rectangle must be at least 1x1 large. - - When the xdg_positioner object is used to position a child surface, the - anchor rectangle may not extend outside the window geometry of the - positioned child's parent surface. - - If a zero or negative size is set the invalid_input error is raised. - - - - - - - - - - - - - - - - - - Defines a set of edges for the anchor rectangle. These are used to - derive an anchor point that the child surface will be positioned - relative to. If two orthogonal edges are specified (e.g. 'top' and - 'left'), then the anchor point will be the intersection of the edges - (e.g. the top left position of the rectangle); otherwise, the derived - anchor point will be centered on the specified edge, or in the center of - the anchor rectangle if no edge is specified. - - If two parallel anchor edges are specified (e.g. 'left' and 'right'), - the invalid_input error is raised. - - - - - - - - - - - - - - - Defines in what direction a surface should be positioned, relative to - the anchor point of the parent surface. If two orthogonal gravities are - specified (e.g. 'bottom' and 'right'), then the child surface will be - placed in the specified direction; otherwise, the child surface will be - centered over the anchor point on any axis that had no gravity - specified. - - If two parallel gravities are specified (e.g. 'left' and 'right'), the - invalid_input error is raised. - - - - - - - The constraint adjustment value define ways the compositor will adjust - the position of the surface, if the unadjusted position would result - in the surface being partly constrained. - - Whether a surface is considered 'constrained' is left to the compositor - to determine. For example, the surface may be partly outside the - compositor's defined 'work area', thus necessitating the child surface's - position be adjusted until it is entirely inside the work area. - - The adjustments can be combined, according to a defined precedence: 1) - Flip, 2) Slide, 3) Resize. - - - - Don't alter the surface position even if it is constrained on some - axis, for example partially outside the edge of a monitor. - - - - - Slide the surface along the x axis until it is no longer constrained. - - First try to slide towards the direction of the gravity on the x axis - until either the edge in the opposite direction of the gravity is - unconstrained or the edge in the direction of the gravity is - constrained. - - Then try to slide towards the opposite direction of the gravity on the - x axis until either the edge in the direction of the gravity is - unconstrained or the edge in the opposite direction of the gravity is - constrained. - - - - - Slide the surface along the y axis until it is no longer constrained. - - First try to slide towards the direction of the gravity on the y axis - until either the edge in the opposite direction of the gravity is - unconstrained or the edge in the direction of the gravity is - constrained. - - Then try to slide towards the opposite direction of the gravity on the - y axis until either the edge in the direction of the gravity is - unconstrained or the edge in the opposite direction of the gravity is - constrained. - - - - - Invert the anchor and gravity on the x axis if the surface is - constrained on the x axis. For example, if the left edge of the - surface is constrained, the gravity is 'left' and the anchor is - 'left', change the gravity to 'right' and the anchor to 'right'. - - If the adjusted position also ends up being constrained, the resulting - position of the flip_x adjustment will be the one before the - adjustment. - - - - - Invert the anchor and gravity on the y axis if the surface is - constrained on the y axis. For example, if the bottom edge of the - surface is constrained, the gravity is 'bottom' and the anchor is - 'bottom', change the gravity to 'top' and the anchor to 'top'. - - If the adjusted position also ends up being constrained, the resulting - position of the flip_y adjustment will be the one before the - adjustment. - - - - - Resize the surface horizontally so that it is completely - unconstrained. - - - - - Resize the surface vertically so that it is completely unconstrained. - - - - - - - Specify how the window should be positioned if the originally intended - position caused the surface to be constrained, meaning at least - partially outside positioning boundaries set by the compositor. The - adjustment is set by constructing a bitmask describing the adjustment to - be made when the surface is constrained on that axis. - - If no bit for one axis is set, the compositor will assume that the child - surface should not change its position on that axis when constrained. - - If more than one bit for one axis is set, the order of how adjustments - are applied is specified in the corresponding adjustment descriptions. - - The default adjustment is none. - - - - - - - Specify the surface position offset relative to the position of the - anchor on the anchor rectangle and the anchor on the surface. For - example if the anchor of the anchor rectangle is at (x, y), the surface - has the gravity bottom|right, and the offset is (ox, oy), the calculated - surface position will be (x + ox, y + oy). The offset position of the - surface is the one used for constraint testing. See - set_constraint_adjustment. - - An example use case is placing a popup menu on top of a user interface - element, while aligning the user interface element of the parent surface - with some user interface element placed somewhere in the popup surface. - - - - - - - - - An interface that may be implemented by a wl_surface, for - implementations that provide a desktop-style user interface. - - It provides a base set of functionality required to construct user - interface elements requiring management by the compositor, such as - toplevel windows, menus, etc. The types of functionality are split into - xdg_surface roles. - - Creating an xdg_surface does not set the role for a wl_surface. In order - to map an xdg_surface, the client must create a role-specific object - using, e.g., get_toplevel, get_popup. The wl_surface for any given - xdg_surface can have at most one role, and may not be assigned any role - not based on xdg_surface. - - A role must be assigned before any other requests are made to the - xdg_surface object. - - The client must call wl_surface.commit on the corresponding wl_surface - for the xdg_surface state to take effect. - - Creating an xdg_surface from a wl_surface which has a buffer attached or - committed is a client error, and any attempts by a client to attach or - manipulate a buffer prior to the first xdg_surface.configure call must - also be treated as errors. - - For a surface to be mapped by the compositor, the following conditions - must be met: (1) the client has assigned a xdg_surface based role to the - surface, (2) the client has set and committed the xdg_surface state and - the role dependent state to the surface and (3) the client has committed a - buffer to the surface. - - - - - - - - - - - Destroy the xdg_surface object. An xdg_surface must only be destroyed - after its role object has been destroyed. - - - - - - This creates an xdg_toplevel object for the given xdg_surface and gives - the associated wl_surface the xdg_toplevel role. - - See the documentation of xdg_toplevel for more details about what an - xdg_toplevel is and how it is used. - - - - - - - This creates an xdg_popup object for the given xdg_surface and gives the - associated wl_surface the xdg_popup role. - - See the documentation of xdg_popup for more details about what an - xdg_popup is and how it is used. - - - - - - - - - The window geometry of a surface is its "visible bounds" from the - user's perspective. Client-side decorations often have invisible - portions like drop-shadows which should be ignored for the - purposes of aligning, placing and constraining windows. - - The window geometry is double buffered, and will be applied at the - time wl_surface.commit of the corresponding wl_surface is called. - - Once the window geometry of the surface is set, it is not possible to - unset it, and it will remain the same until set_window_geometry is - called again, even if a new subsurface or buffer is attached. - - If never set, the value is the full bounds of the surface, - including any subsurfaces. This updates dynamically on every - commit. This unset is meant for extremely simple clients. - - The arguments are given in the surface-local coordinate space of - the wl_surface associated with this xdg_surface. - - The width and height must be greater than zero. Setting an invalid size - will raise an error. When applied, the effective window geometry will be - the set window geometry clamped to the bounding rectangle of the - combined geometry of the surface of the xdg_surface and the associated - subsurfaces. - - - - - - - - - - When a configure event is received, if a client commits the - surface in response to the configure event, then the client - must make an ack_configure request sometime before the commit - request, passing along the serial of the configure event. - - For instance, for toplevel surfaces the compositor might use this - information to move a surface to the top left only when the client has - drawn itself for the maximized or fullscreen state. - - If the client receives multiple configure events before it - can respond to one, it only has to ack the last configure event. - - A client is not required to commit immediately after sending - an ack_configure request - it may even ack_configure several times - before its next surface commit. - - A client may send multiple ack_configure requests before committing, but - only the last request sent before a commit indicates which configure - event the client really is responding to. - - - - - - - The configure event marks the end of a configure sequence. A configure - sequence is a set of one or more events configuring the state of the - xdg_surface, including the final xdg_surface.configure event. - - Where applicable, xdg_surface surface roles will during a configure - sequence extend this event as a latched state sent as events before the - xdg_surface.configure event. Such events should be considered to make up - a set of atomically applied configuration states, where the - xdg_surface.configure commits the accumulated state. - - Clients should arrange their surface for the new states, and then send - an ack_configure request with the serial sent in this configure event at - some point before committing the new surface. - - If the client receives multiple configure events before it can respond - to one, it is free to discard all but the last event it received. - - - - - - - - This interface defines an xdg_surface role which allows a surface to, - among other things, set window-like properties such as maximize, - fullscreen, and minimize, set application-specific metadata like title and - id, and well as trigger user interactive operations such as interactive - resize and move. - - - - - Unmap and destroy the window. The window will be effectively - hidden from the user's point of view, and all state like - maximization, fullscreen, and so on, will be lost. - - - - - - Set the "parent" of this surface. This window should be stacked - above a parent. The parent surface must be mapped as long as this - surface is mapped. - - Parent windows should be set on dialogs, toolboxes, or other - "auxiliary" surfaces, so that the parent is raised when the dialog - is raised. - - - - - - - Set a short title for the surface. - - This string may be used to identify the surface in a task bar, - window list, or other user interface elements provided by the - compositor. - - The string must be encoded in UTF-8. - - - - - - - Set an application identifier for the surface. - - The app ID identifies the general class of applications to which - the surface belongs. The compositor can use this to group multiple - surfaces together, or to determine how to launch a new application. - - For D-Bus activatable applications, the app ID is used as the D-Bus - service name. - - The compositor shell will try to group application surfaces together - by their app ID. As a best practice, it is suggested to select app - ID's that match the basename of the application's .desktop file. - For example, "org.freedesktop.FooViewer" where the .desktop file is - "org.freedesktop.FooViewer.desktop". - - See the desktop-entry specification [0] for more details on - application identifiers and how they relate to well-known D-Bus - names and .desktop files. - - [0] http://standards.freedesktop.org/desktop-entry-spec/ - - - - - - - Clients implementing client-side decorations might want to show - a context menu when right-clicking on the decorations, giving the - user a menu that they can use to maximize or minimize the window. - - This request asks the compositor to pop up such a window menu at - the given position, relative to the local surface coordinates of - the parent surface. There are no guarantees as to what menu items - the window menu contains. - - This request must be used in response to some sort of user action - like a button press, key press, or touch down event. - - - - - - - - - - Start an interactive, user-driven move of the surface. - - This request must be used in response to some sort of user action - like a button press, key press, or touch down event. The passed - serial is used to determine the type of interactive move (touch, - pointer, etc). - - The server may ignore move requests depending on the state of - the surface (e.g. fullscreen or maximized), or if the passed serial - is no longer valid. - - If triggered, the surface will lose the focus of the device - (wl_pointer, wl_touch, etc) used for the move. It is up to the - compositor to visually indicate that the move is taking place, such as - updating a pointer cursor, during the move. There is no guarantee - that the device focus will return when the move is completed. - - - - - - - - These values are used to indicate which edge of a surface - is being dragged in a resize operation. - - - - - - - - - - - - - - - Start a user-driven, interactive resize of the surface. - - This request must be used in response to some sort of user action - like a button press, key press, or touch down event. The passed - serial is used to determine the type of interactive resize (touch, - pointer, etc). - - The server may ignore resize requests depending on the state of - the surface (e.g. fullscreen or maximized). - - If triggered, the client will receive configure events with the - "resize" state enum value and the expected sizes. See the "resize" - enum value for more details about what is required. The client - must also acknowledge configure events using "ack_configure". After - the resize is completed, the client will receive another "configure" - event without the resize state. - - If triggered, the surface also will lose the focus of the device - (wl_pointer, wl_touch, etc) used for the resize. It is up to the - compositor to visually indicate that the resize is taking place, - such as updating a pointer cursor, during the resize. There is no - guarantee that the device focus will return when the resize is - completed. - - The edges parameter specifies how the surface should be resized, - and is one of the values of the resize_edge enum. The compositor - may use this information to update the surface position for - example when dragging the top left corner. The compositor may also - use this information to adapt its behavior, e.g. choose an - appropriate cursor image. - - - - - - - - - The different state values used on the surface. This is designed for - state values like maximized, fullscreen. It is paired with the - configure event to ensure that both the client and the compositor - setting the state can be synchronized. - - States set in this way are double-buffered. They will get applied on - the next commit. - - - - The surface is maximized. The window geometry specified in the configure - event must be obeyed by the client. - - - - - The surface is fullscreen. The window geometry specified in the configure - event must be obeyed by the client. - - - - - The surface is being resized. The window geometry specified in the - configure event is a maximum; the client cannot resize beyond it. - Clients that have aspect ratio or cell sizing configuration can use - a smaller size, however. - - - - - Client window decorations should be painted as if the window is - active. Do not assume this means that the window actually has - keyboard or pointer focus. - - - - - - - Set a maximum size for the window. - - The client can specify a maximum size so that the compositor does - not try to configure the window beyond this size. - - The width and height arguments are in window geometry coordinates. - See xdg_surface.set_window_geometry. - - Values set in this way are double-buffered. They will get applied - on the next commit. - - The compositor can use this information to allow or disallow - different states like maximize or fullscreen and draw accurate - animations. - - Similarly, a tiling window manager may use this information to - place and resize client windows in a more effective way. - - The client should not rely on the compositor to obey the maximum - size. The compositor may decide to ignore the values set by the - client and request a larger size. - - If never set, or a value of zero in the request, means that the - client has no expected maximum size in the given dimension. - As a result, a client wishing to reset the maximum size - to an unspecified state can use zero for width and height in the - request. - - Requesting a maximum size to be smaller than the minimum size of - a surface is illegal and will result in a protocol error. - - The width and height must be greater than or equal to zero. Using - strictly negative values for width and height will result in a - protocol error. - - - - - - - - Set a minimum size for the window. - - The client can specify a minimum size so that the compositor does - not try to configure the window below this size. - - The width and height arguments are in window geometry coordinates. - See xdg_surface.set_window_geometry. - - Values set in this way are double-buffered. They will get applied - on the next commit. - - The compositor can use this information to allow or disallow - different states like maximize or fullscreen and draw accurate - animations. - - Similarly, a tiling window manager may use this information to - place and resize client windows in a more effective way. - - The client should not rely on the compositor to obey the minimum - size. The compositor may decide to ignore the values set by the - client and request a smaller size. - - If never set, or a value of zero in the request, means that the - client has no expected minimum size in the given dimension. - As a result, a client wishing to reset the minimum size - to an unspecified state can use zero for width and height in the - request. - - Requesting a minimum size to be larger than the maximum size of - a surface is illegal and will result in a protocol error. - - The width and height must be greater than or equal to zero. Using - strictly negative values for width and height will result in a - protocol error. - - - - - - - - Maximize the surface. - - After requesting that the surface should be maximized, the compositor - will respond by emitting a configure event with the "maximized" state - and the required window geometry. The client should then update its - content, drawing it in a maximized state, i.e. without shadow or other - decoration outside of the window geometry. The client must also - acknowledge the configure when committing the new content (see - ack_configure). - - It is up to the compositor to decide how and where to maximize the - surface, for example which output and what region of the screen should - be used. - - If the surface was already maximized, the compositor will still emit - a configure event with the "maximized" state. - - - - - - Unmaximize the surface. - - After requesting that the surface should be unmaximized, the compositor - will respond by emitting a configure event without the "maximized" - state. If available, the compositor will include the window geometry - dimensions the window had prior to being maximized in the configure - request. The client must then update its content, drawing it in a - regular state, i.e. potentially with shadow, etc. The client must also - acknowledge the configure when committing the new content (see - ack_configure). - - It is up to the compositor to position the surface after it was - unmaximized; usually the position the surface had before maximizing, if - applicable. - - If the surface was already not maximized, the compositor will still - emit a configure event without the "maximized" state. - - - - - - Make the surface fullscreen. - - You can specify an output that you would prefer to be fullscreen. - If this value is NULL, it's up to the compositor to choose which - display will be used to map this surface. - - If the surface doesn't cover the whole output, the compositor will - position the surface in the center of the output and compensate with - black borders filling the rest of the output. - - - - - - - - Request that the compositor minimize your surface. There is no - way to know if the surface is currently minimized, nor is there - any way to unset minimization on this surface. - - If you are looking to throttle redrawing when minimized, please - instead use the wl_surface.frame event for this, as this will - also work with live previews on windows in Alt-Tab, Expose or - similar compositor features. - - - - - - This configure event asks the client to resize its toplevel surface or - to change its state. The configured state should not be applied - immediately. See xdg_surface.configure for details. - - The width and height arguments specify a hint to the window - about how its surface should be resized in window geometry - coordinates. See set_window_geometry. - - If the width or height arguments are zero, it means the client - should decide its own window dimension. This may happen when the - compositor needs to configure the state of the surface but doesn't - have any information about any previous or expected dimension. - - The states listed in the event specify how the width/height - arguments should be interpreted, and possibly how it should be - drawn. - - Clients must send an ack_configure in response to this event. See - xdg_surface.configure and xdg_surface.ack_configure for details. - - - - - - - - - The close event is sent by the compositor when the user - wants the surface to be closed. This should be equivalent to - the user clicking the close button in client-side decorations, - if your application has any. - - This is only a request that the user intends to close the - window. The client may choose to ignore this request, or show - a dialog to ask the user to save their data, etc. - - - - - - - A popup surface is a short-lived, temporary surface. It can be used to - implement for example menus, popovers, tooltips and other similar user - interface concepts. - - A popup can be made to take an explicit grab. See xdg_popup.grab for - details. - - When the popup is dismissed, a popup_done event will be sent out, and at - the same time the surface will be unmapped. See the xdg_popup.popup_done - event for details. - - Explicitly destroying the xdg_popup object will also dismiss the popup and - unmap the surface. Clients that want to dismiss the popup when another - surface of their own is clicked should dismiss the popup using the destroy - request. - - The parent surface must have either the xdg_toplevel or xdg_popup surface - role. - - A newly created xdg_popup will be stacked on top of all previously created - xdg_popup surfaces associated with the same xdg_toplevel. - - The parent of an xdg_popup must be mapped (see the xdg_surface - description) before the xdg_popup itself. - - The x and y arguments passed when creating the popup object specify - where the top left of the popup should be placed, relative to the - local surface coordinates of the parent surface. See - xdg_surface.get_popup. An xdg_popup must intersect with or be at least - partially adjacent to its parent surface. - - The client must call wl_surface.commit on the corresponding wl_surface - for the xdg_popup state to take effect. - - - - - - - - - This destroys the popup. Explicitly destroying the xdg_popup - object will also dismiss the popup, and unmap the surface. - - If this xdg_popup is not the "topmost" popup, a protocol error - will be sent. - - - - - - This request makes the created popup take an explicit grab. An explicit - grab will be dismissed when the user dismisses the popup, or when the - client destroys the xdg_popup. This can be done by the user clicking - outside the surface, using the keyboard, or even locking the screen - through closing the lid or a timeout. - - If the compositor denies the grab, the popup will be immediately - dismissed. - - This request must be used in response to some sort of user action like a - button press, key press, or touch down event. The serial number of the - event should be passed as 'serial'. - - The parent of a grabbing popup must either be an xdg_toplevel surface or - another xdg_popup with an explicit grab. If the parent is another - xdg_popup it means that the popups are nested, with this popup now being - the topmost popup. - - Nested popups must be destroyed in the reverse order they were created - in, e.g. the only popup you are allowed to destroy at all times is the - topmost one. - - When compositors choose to dismiss a popup, they may dismiss every - nested grabbing popup as well. When a compositor dismisses popups, it - will follow the same dismissing order as required from the client. - - The parent of a grabbing popup must either be another xdg_popup with an - active explicit grab, or an xdg_popup or xdg_toplevel, if there are no - explicit grabs already taken. - - If the topmost grabbing popup is destroyed, the grab will be returned to - the parent of the popup, if that parent previously had an explicit grab. - - If the parent is a grabbing popup which has already been dismissed, this - popup will be immediately dismissed. If the parent is a popup that did - not take an explicit grab, an error will be raised. - - During a popup grab, the client owning the grab will receive pointer - and touch events for all their surfaces as normal (similar to an - "owner-events" grab in X11 parlance), while the top most grabbing popup - will always have keyboard focus. - - - - - - - - This event asks the popup surface to configure itself given the - configuration. The configured state should not be applied immediately. - See xdg_surface.configure for details. - - The x and y arguments represent the position the popup was placed at - given the xdg_positioner rule, relative to the upper left corner of the - window geometry of the parent surface. - - - - - - - - - - The popup_done event is sent out when a popup is dismissed by the - compositor. The client should destroy the xdg_popup object at this - point. - - - - - diff --git a/src/client/protocols/xdg-shell.xml b/src/client/protocols/xdg-shell.xml deleted file mode 100644 index d524ea9..0000000 --- a/src/client/protocols/xdg-shell.xml +++ /dev/null @@ -1,1120 +0,0 @@ - - - - - Copyright © 2008-2013 Kristian Høgsberg - Copyright © 2013 Rafael Antognolli - Copyright © 2013 Jasper St. Pierre - Copyright © 2010-2013 Intel Corporation - Copyright © 2015-2017 Samsung Electronics Co., Ltd - Copyright © 2015-2017 Red Hat Inc. - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice (including the next - paragraph) shall be included in all copies or substantial portions of the - Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - - - - The xdg_wm_base interface is exposed as a global object enabling clients - to turn their wl_surfaces into windows in a desktop environment. It - defines the basic functionality needed for clients and the compositor to - create windows that can be dragged, resized, maximized, etc, as well as - creating transient windows such as popup menus. - - - - - - - - - - - - - - Destroy this xdg_wm_base object. - - Destroying a bound xdg_wm_base object while there are surfaces - still alive created by this xdg_wm_base object instance is illegal - and will result in a protocol error. - - - - - - Create a positioner object. A positioner object is used to position - surfaces relative to some parent surface. See the interface description - and xdg_surface.get_popup for details. - - - - - - - This creates an xdg_surface for the given surface. While xdg_surface - itself is not a role, the corresponding surface may only be assigned - a role extending xdg_surface, such as xdg_toplevel or xdg_popup. - - This creates an xdg_surface for the given surface. An xdg_surface is - used as basis to define a role to a given surface, such as xdg_toplevel - or xdg_popup. It also manages functionality shared between xdg_surface - based surface roles. - - See the documentation of xdg_surface for more details about what an - xdg_surface is and how it is used. - - - - - - - - A client must respond to a ping event with a pong request or - the client may be deemed unresponsive. See xdg_wm_base.ping. - - - - - - - The ping event asks the client if it's still alive. Pass the - serial specified in the event back to the compositor by sending - a "pong" request back with the specified serial. See xdg_wm_base.ping. - - Compositors can use this to determine if the client is still - alive. It's unspecified what will happen if the client doesn't - respond to the ping request, or in what timeframe. Clients should - try to respond in a reasonable amount of time. - - A compositor is free to ping in any way it wants, but a client must - always respond to any xdg_wm_base object it created. - - - - - - - - The xdg_positioner provides a collection of rules for the placement of a - child surface relative to a parent surface. Rules can be defined to ensure - the child surface remains within the visible area's borders, and to - specify how the child surface changes its position, such as sliding along - an axis, or flipping around a rectangle. These positioner-created rules are - constrained by the requirement that a child surface must intersect with or - be at least partially adjacent to its parent surface. - - See the various requests for details about possible rules. - - At the time of the request, the compositor makes a copy of the rules - specified by the xdg_positioner. Thus, after the request is complete the - xdg_positioner object can be destroyed or reused; further changes to the - object will have no effect on previous usages. - - For an xdg_positioner object to be considered complete, it must have a - non-zero size set by set_size, and a non-zero anchor rectangle set by - set_anchor_rect. Passing an incomplete xdg_positioner object when - positioning a surface raises an error. - - - - - - - - - Notify the compositor that the xdg_positioner will no longer be used. - - - - - - Set the size of the surface that is to be positioned with the positioner - object. The size is in surface-local coordinates and corresponds to the - window geometry. See xdg_surface.set_window_geometry. - - If a zero or negative size is set the invalid_input error is raised. - - - - - - - - Specify the anchor rectangle within the parent surface that the child - surface will be placed relative to. The rectangle is relative to the - window geometry as defined by xdg_surface.set_window_geometry of the - parent surface. - - When the xdg_positioner object is used to position a child surface, the - anchor rectangle may not extend outside the window geometry of the - positioned child's parent surface. - - If a negative size is set the invalid_input error is raised. - - - - - - - - - - - - - - - - - - - - - - Defines the anchor point for the anchor rectangle. The specified anchor - is used derive an anchor point that the child surface will be - positioned relative to. If a corner anchor is set (e.g. 'top_left' or - 'bottom_right'), the anchor point will be at the specified corner; - otherwise, the derived anchor point will be centered on the specified - edge, or in the center of the anchor rectangle if no edge is specified. - - - - - - - - - - - - - - - - - - - Defines in what direction a surface should be positioned, relative to - the anchor point of the parent surface. If a corner gravity is - specified (e.g. 'bottom_right' or 'top_left'), then the child surface - will be placed towards the specified gravity; otherwise, the child - surface will be centered over the anchor point on any axis that had no - gravity specified. - - - - - - - The constraint adjustment value define ways the compositor will adjust - the position of the surface, if the unadjusted position would result - in the surface being partly constrained. - - Whether a surface is considered 'constrained' is left to the compositor - to determine. For example, the surface may be partly outside the - compositor's defined 'work area', thus necessitating the child surface's - position be adjusted until it is entirely inside the work area. - - The adjustments can be combined, according to a defined precedence: 1) - Flip, 2) Slide, 3) Resize. - - - - Don't alter the surface position even if it is constrained on some - axis, for example partially outside the edge of an output. - - - - - Slide the surface along the x axis until it is no longer constrained. - - First try to slide towards the direction of the gravity on the x axis - until either the edge in the opposite direction of the gravity is - unconstrained or the edge in the direction of the gravity is - constrained. - - Then try to slide towards the opposite direction of the gravity on the - x axis until either the edge in the direction of the gravity is - unconstrained or the edge in the opposite direction of the gravity is - constrained. - - - - - Slide the surface along the y axis until it is no longer constrained. - - First try to slide towards the direction of the gravity on the y axis - until either the edge in the opposite direction of the gravity is - unconstrained or the edge in the direction of the gravity is - constrained. - - Then try to slide towards the opposite direction of the gravity on the - y axis until either the edge in the direction of the gravity is - unconstrained or the edge in the opposite direction of the gravity is - constrained. - - - - - Invert the anchor and gravity on the x axis if the surface is - constrained on the x axis. For example, if the left edge of the - surface is constrained, the gravity is 'left' and the anchor is - 'left', change the gravity to 'right' and the anchor to 'right'. - - If the adjusted position also ends up being constrained, the resulting - position of the flip_x adjustment will be the one before the - adjustment. - - - - - Invert the anchor and gravity on the y axis if the surface is - constrained on the y axis. For example, if the bottom edge of the - surface is constrained, the gravity is 'bottom' and the anchor is - 'bottom', change the gravity to 'top' and the anchor to 'top'. - - The adjusted position is calculated given the original anchor - rectangle and offset, but with the new flipped anchor and gravity - values. - - If the adjusted position also ends up being constrained, the resulting - position of the flip_y adjustment will be the one before the - adjustment. - - - - - Resize the surface horizontally so that it is completely - unconstrained. - - - - - Resize the surface vertically so that it is completely unconstrained. - - - - - - - Specify how the window should be positioned if the originally intended - position caused the surface to be constrained, meaning at least - partially outside positioning boundaries set by the compositor. The - adjustment is set by constructing a bitmask describing the adjustment to - be made when the surface is constrained on that axis. - - If no bit for one axis is set, the compositor will assume that the child - surface should not change its position on that axis when constrained. - - If more than one bit for one axis is set, the order of how adjustments - are applied is specified in the corresponding adjustment descriptions. - - The default adjustment is none. - - - - - - - Specify the surface position offset relative to the position of the - anchor on the anchor rectangle and the anchor on the surface. For - example if the anchor of the anchor rectangle is at (x, y), the surface - has the gravity bottom|right, and the offset is (ox, oy), the calculated - surface position will be (x + ox, y + oy). The offset position of the - surface is the one used for constraint testing. See - set_constraint_adjustment. - - An example use case is placing a popup menu on top of a user interface - element, while aligning the user interface element of the parent surface - with some user interface element placed somewhere in the popup surface. - - - - - - - - - An interface that may be implemented by a wl_surface, for - implementations that provide a desktop-style user interface. - - It provides a base set of functionality required to construct user - interface elements requiring management by the compositor, such as - toplevel windows, menus, etc. The types of functionality are split into - xdg_surface roles. - - Creating an xdg_surface does not set the role for a wl_surface. In order - to map an xdg_surface, the client must create a role-specific object - using, e.g., get_toplevel, get_popup. The wl_surface for any given - xdg_surface can have at most one role, and may not be assigned any role - not based on xdg_surface. - - A role must be assigned before any other requests are made to the - xdg_surface object. - - The client must call wl_surface.commit on the corresponding wl_surface - for the xdg_surface state to take effect. - - Creating an xdg_surface from a wl_surface which has a buffer attached or - committed is a client error, and any attempts by a client to attach or - manipulate a buffer prior to the first xdg_surface.configure call must - also be treated as errors. - - Mapping an xdg_surface-based role surface is defined as making it - possible for the surface to be shown by the compositor. Note that - a mapped surface is not guaranteed to be visible once it is mapped. - - For an xdg_surface to be mapped by the compositor, the following - conditions must be met: - (1) the client has assigned an xdg_surface-based role to the surface - (2) the client has set and committed the xdg_surface state and the - role-dependent state to the surface - (3) the client has committed a buffer to the surface - - A newly-unmapped surface is considered to have met condition (1) out - of the 3 required conditions for mapping a surface if its role surface - has not been destroyed. - - - - - - - - - - - Destroy the xdg_surface object. An xdg_surface must only be destroyed - after its role object has been destroyed. - - - - - - This creates an xdg_toplevel object for the given xdg_surface and gives - the associated wl_surface the xdg_toplevel role. - - See the documentation of xdg_toplevel for more details about what an - xdg_toplevel is and how it is used. - - - - - - - This creates an xdg_popup object for the given xdg_surface and gives - the associated wl_surface the xdg_popup role. - - If null is passed as a parent, a parent surface must be specified using - some other protocol, before committing the initial state. - - See the documentation of xdg_popup for more details about what an - xdg_popup is and how it is used. - - - - - - - - - The window geometry of a surface is its "visible bounds" from the - user's perspective. Client-side decorations often have invisible - portions like drop-shadows which should be ignored for the - purposes of aligning, placing and constraining windows. - - The window geometry is double buffered, and will be applied at the - time wl_surface.commit of the corresponding wl_surface is called. - - When maintaining a position, the compositor should treat the (x, y) - coordinate of the window geometry as the top left corner of the window. - A client changing the (x, y) window geometry coordinate should in - general not alter the position of the window. - - Once the window geometry of the surface is set, it is not possible to - unset it, and it will remain the same until set_window_geometry is - called again, even if a new subsurface or buffer is attached. - - If never set, the value is the full bounds of the surface, - including any subsurfaces. This updates dynamically on every - commit. This unset is meant for extremely simple clients. - - The arguments are given in the surface-local coordinate space of - the wl_surface associated with this xdg_surface. - - The width and height must be greater than zero. Setting an invalid size - will raise an error. When applied, the effective window geometry will be - the set window geometry clamped to the bounding rectangle of the - combined geometry of the surface of the xdg_surface and the associated - subsurfaces. - - - - - - - - - - When a configure event is received, if a client commits the - surface in response to the configure event, then the client - must make an ack_configure request sometime before the commit - request, passing along the serial of the configure event. - - For instance, for toplevel surfaces the compositor might use this - information to move a surface to the top left only when the client has - drawn itself for the maximized or fullscreen state. - - If the client receives multiple configure events before it - can respond to one, it only has to ack the last configure event. - - A client is not required to commit immediately after sending - an ack_configure request - it may even ack_configure several times - before its next surface commit. - - A client may send multiple ack_configure requests before committing, but - only the last request sent before a commit indicates which configure - event the client really is responding to. - - - - - - - The configure event marks the end of a configure sequence. A configure - sequence is a set of one or more events configuring the state of the - xdg_surface, including the final xdg_surface.configure event. - - Where applicable, xdg_surface surface roles will during a configure - sequence extend this event as a latched state sent as events before the - xdg_surface.configure event. Such events should be considered to make up - a set of atomically applied configuration states, where the - xdg_surface.configure commits the accumulated state. - - Clients should arrange their surface for the new states, and then send - an ack_configure request with the serial sent in this configure event at - some point before committing the new surface. - - If the client receives multiple configure events before it can respond - to one, it is free to discard all but the last event it received. - - - - - - - - This interface defines an xdg_surface role which allows a surface to, - among other things, set window-like properties such as maximize, - fullscreen, and minimize, set application-specific metadata like title and - id, and well as trigger user interactive operations such as interactive - resize and move. - - Unmapping an xdg_toplevel means that the surface cannot be shown - by the compositor until it is explicitly mapped again. - All active operations (e.g., move, resize) are canceled and all - attributes (e.g. title, state, stacking, ...) are discarded for - an xdg_toplevel surface when it is unmapped. - - Attaching a null buffer to a toplevel unmaps the surface. - - - - - This request destroys the role surface and unmaps the surface; - see "Unmapping" behavior in interface section for details. - - - - - - Set the "parent" of this surface. This surface should be stacked - above the parent surface and all other ancestor surfaces. - - Parent windows should be set on dialogs, toolboxes, or other - "auxiliary" surfaces, so that the parent is raised when the dialog - is raised. - - Setting a null parent for a child window removes any parent-child - relationship for the child. Setting a null parent for a window which - currently has no parent is a no-op. - - If the parent is unmapped then its children are managed as - though the parent of the now-unmapped parent has become the - parent of this surface. If no parent exists for the now-unmapped - parent then the children are managed as though they have no - parent surface. - - - - - - - Set a short title for the surface. - - This string may be used to identify the surface in a task bar, - window list, or other user interface elements provided by the - compositor. - - The string must be encoded in UTF-8. - - - - - - - Set an application identifier for the surface. - - The app ID identifies the general class of applications to which - the surface belongs. The compositor can use this to group multiple - surfaces together, or to determine how to launch a new application. - - For D-Bus activatable applications, the app ID is used as the D-Bus - service name. - - The compositor shell will try to group application surfaces together - by their app ID. As a best practice, it is suggested to select app - ID's that match the basename of the application's .desktop file. - For example, "org.freedesktop.FooViewer" where the .desktop file is - "org.freedesktop.FooViewer.desktop". - - See the desktop-entry specification [0] for more details on - application identifiers and how they relate to well-known D-Bus - names and .desktop files. - - [0] http://standards.freedesktop.org/desktop-entry-spec/ - - - - - - - Clients implementing client-side decorations might want to show - a context menu when right-clicking on the decorations, giving the - user a menu that they can use to maximize or minimize the window. - - This request asks the compositor to pop up such a window menu at - the given position, relative to the local surface coordinates of - the parent surface. There are no guarantees as to what menu items - the window menu contains. - - This request must be used in response to some sort of user action - like a button press, key press, or touch down event. - - - - - - - - - - Start an interactive, user-driven move of the surface. - - This request must be used in response to some sort of user action - like a button press, key press, or touch down event. The passed - serial is used to determine the type of interactive move (touch, - pointer, etc). - - The server may ignore move requests depending on the state of - the surface (e.g. fullscreen or maximized), or if the passed serial - is no longer valid. - - If triggered, the surface will lose the focus of the device - (wl_pointer, wl_touch, etc) used for the move. It is up to the - compositor to visually indicate that the move is taking place, such as - updating a pointer cursor, during the move. There is no guarantee - that the device focus will return when the move is completed. - - - - - - - - These values are used to indicate which edge of a surface - is being dragged in a resize operation. - - - - - - - - - - - - - - - Start a user-driven, interactive resize of the surface. - - This request must be used in response to some sort of user action - like a button press, key press, or touch down event. The passed - serial is used to determine the type of interactive resize (touch, - pointer, etc). - - The server may ignore resize requests depending on the state of - the surface (e.g. fullscreen or maximized). - - If triggered, the client will receive configure events with the - "resize" state enum value and the expected sizes. See the "resize" - enum value for more details about what is required. The client - must also acknowledge configure events using "ack_configure". After - the resize is completed, the client will receive another "configure" - event without the resize state. - - If triggered, the surface also will lose the focus of the device - (wl_pointer, wl_touch, etc) used for the resize. It is up to the - compositor to visually indicate that the resize is taking place, - such as updating a pointer cursor, during the resize. There is no - guarantee that the device focus will return when the resize is - completed. - - The edges parameter specifies how the surface should be resized, - and is one of the values of the resize_edge enum. The compositor - may use this information to update the surface position for - example when dragging the top left corner. The compositor may also - use this information to adapt its behavior, e.g. choose an - appropriate cursor image. - - - - - - - - - The different state values used on the surface. This is designed for - state values like maximized, fullscreen. It is paired with the - configure event to ensure that both the client and the compositor - setting the state can be synchronized. - - States set in this way are double-buffered. They will get applied on - the next commit. - - - - The surface is maximized. The window geometry specified in the configure - event must be obeyed by the client. - - - - - The surface is fullscreen. The window geometry specified in the - configure event is a maximum; the client cannot resize beyond it. For - a surface to cover the whole fullscreened area, the geometry - dimensions must be obeyed by the client. For more details, see - xdg_toplevel.set_fullscreen. - - - - - The surface is being resized. The window geometry specified in the - configure event is a maximum; the client cannot resize beyond it. - Clients that have aspect ratio or cell sizing configuration can use - a smaller size, however. - - - - - Client window decorations should be painted as if the window is - active. Do not assume this means that the window actually has - keyboard or pointer focus. - - - - - - - Set a maximum size for the window. - - The client can specify a maximum size so that the compositor does - not try to configure the window beyond this size. - - The width and height arguments are in window geometry coordinates. - See xdg_surface.set_window_geometry. - - Values set in this way are double-buffered. They will get applied - on the next commit. - - The compositor can use this information to allow or disallow - different states like maximize or fullscreen and draw accurate - animations. - - Similarly, a tiling window manager may use this information to - place and resize client windows in a more effective way. - - The client should not rely on the compositor to obey the maximum - size. The compositor may decide to ignore the values set by the - client and request a larger size. - - If never set, or a value of zero in the request, means that the - client has no expected maximum size in the given dimension. - As a result, a client wishing to reset the maximum size - to an unspecified state can use zero for width and height in the - request. - - Requesting a maximum size to be smaller than the minimum size of - a surface is illegal and will result in a protocol error. - - The width and height must be greater than or equal to zero. Using - strictly negative values for width and height will result in a - protocol error. - - - - - - - - Set a minimum size for the window. - - The client can specify a minimum size so that the compositor does - not try to configure the window below this size. - - The width and height arguments are in window geometry coordinates. - See xdg_surface.set_window_geometry. - - Values set in this way are double-buffered. They will get applied - on the next commit. - - The compositor can use this information to allow or disallow - different states like maximize or fullscreen and draw accurate - animations. - - Similarly, a tiling window manager may use this information to - place and resize client windows in a more effective way. - - The client should not rely on the compositor to obey the minimum - size. The compositor may decide to ignore the values set by the - client and request a smaller size. - - If never set, or a value of zero in the request, means that the - client has no expected minimum size in the given dimension. - As a result, a client wishing to reset the minimum size - to an unspecified state can use zero for width and height in the - request. - - Requesting a minimum size to be larger than the maximum size of - a surface is illegal and will result in a protocol error. - - The width and height must be greater than or equal to zero. Using - strictly negative values for width and height will result in a - protocol error. - - - - - - - - Maximize the surface. - - After requesting that the surface should be maximized, the compositor - will respond by emitting a configure event with the "maximized" state - and the required window geometry. The client should then update its - content, drawing it in a maximized state, i.e. without shadow or other - decoration outside of the window geometry. The client must also - acknowledge the configure when committing the new content (see - ack_configure). - - It is up to the compositor to decide how and where to maximize the - surface, for example which output and what region of the screen should - be used. - - If the surface was already maximized, the compositor will still emit - a configure event with the "maximized" state. - - If the surface is in a fullscreen state, this request has no direct - effect. It will alter the state the surface is returned to when - unmaximized if not overridden by the compositor. - - - - - - Unmaximize the surface. - - After requesting that the surface should be unmaximized, the compositor - will respond by emitting a configure event without the "maximized" - state. If available, the compositor will include the window geometry - dimensions the window had prior to being maximized in the configure - event. The client must then update its content, drawing it in a - regular state, i.e. potentially with shadow, etc. The client must also - acknowledge the configure when committing the new content (see - ack_configure). - - It is up to the compositor to position the surface after it was - unmaximized; usually the position the surface had before maximizing, if - applicable. - - If the surface was already not maximized, the compositor will still - emit a configure event without the "maximized" state. - - If the surface is in a fullscreen state, this request has no direct - effect. It will alter the state the surface is returned to when - unmaximized if not overridden by the compositor. - - - - - - Make the surface fullscreen. - - After requesting that the surface should be fullscreened, the - compositor will respond by emitting a configure event with the - "fullscreen" state and the fullscreen window geometry. The client must - also acknowledge the configure when committing the new content (see - ack_configure). - - The output passed by the request indicates the client's preference as - to which display it should be set fullscreen on. If this value is NULL, - it's up to the compositor to choose which display will be used to map - this surface. - - If the surface doesn't cover the whole output, the compositor will - position the surface in the center of the output and compensate with - with border fill covering the rest of the output. The content of the - border fill is undefined, but should be assumed to be in some way that - attempts to blend into the surrounding area (e.g. solid black). - - If the fullscreened surface is not opaque, the compositor must make - sure that other screen content not part of the same surface tree (made - up of subsurfaces, popups or similarly coupled surfaces) are not - visible below the fullscreened surface. - - - - - - - Make the surface no longer fullscreen. - - After requesting that the surface should be unfullscreened, the - compositor will respond by emitting a configure event without the - "fullscreen" state. - - Making a surface unfullscreen sets states for the surface based on the following: - * the state(s) it may have had before becoming fullscreen - * any state(s) decided by the compositor - * any state(s) requested by the client while the surface was fullscreen - - The compositor may include the previous window geometry dimensions in - the configure event, if applicable. - - The client must also acknowledge the configure when committing the new - content (see ack_configure). - - - - - - Request that the compositor minimize your surface. There is no - way to know if the surface is currently minimized, nor is there - any way to unset minimization on this surface. - - If you are looking to throttle redrawing when minimized, please - instead use the wl_surface.frame event for this, as this will - also work with live previews on windows in Alt-Tab, Expose or - similar compositor features. - - - - - - This configure event asks the client to resize its toplevel surface or - to change its state. The configured state should not be applied - immediately. See xdg_surface.configure for details. - - The width and height arguments specify a hint to the window - about how its surface should be resized in window geometry - coordinates. See set_window_geometry. - - If the width or height arguments are zero, it means the client - should decide its own window dimension. This may happen when the - compositor needs to configure the state of the surface but doesn't - have any information about any previous or expected dimension. - - The states listed in the event specify how the width/height - arguments should be interpreted, and possibly how it should be - drawn. - - Clients must send an ack_configure in response to this event. See - xdg_surface.configure and xdg_surface.ack_configure for details. - - - - - - - - - The close event is sent by the compositor when the user - wants the surface to be closed. This should be equivalent to - the user clicking the close button in client-side decorations, - if your application has any. - - This is only a request that the user intends to close the - window. The client may choose to ignore this request, or show - a dialog to ask the user to save their data, etc. - - - - - - - A popup surface is a short-lived, temporary surface. It can be used to - implement for example menus, popovers, tooltips and other similar user - interface concepts. - - A popup can be made to take an explicit grab. See xdg_popup.grab for - details. - - When the popup is dismissed, a popup_done event will be sent out, and at - the same time the surface will be unmapped. See the xdg_popup.popup_done - event for details. - - Explicitly destroying the xdg_popup object will also dismiss the popup and - unmap the surface. Clients that want to dismiss the popup when another - surface of their own is clicked should dismiss the popup using the destroy - request. - - The parent surface must have either the xdg_toplevel or xdg_popup surface - role. - - A newly created xdg_popup will be stacked on top of all previously created - xdg_popup surfaces associated with the same xdg_toplevel. - - The parent of an xdg_popup must be mapped (see the xdg_surface - description) before the xdg_popup itself. - - The x and y arguments passed when creating the popup object specify - where the top left of the popup should be placed, relative to the - local surface coordinates of the parent surface. See - xdg_surface.get_popup. An xdg_popup must intersect with or be at least - partially adjacent to its parent surface. - - The client must call wl_surface.commit on the corresponding wl_surface - for the xdg_popup state to take effect. - - - - - - - - - This destroys the popup. Explicitly destroying the xdg_popup - object will also dismiss the popup, and unmap the surface. - - If this xdg_popup is not the "topmost" popup, a protocol error - will be sent. - - - - - - This request makes the created popup take an explicit grab. An explicit - grab will be dismissed when the user dismisses the popup, or when the - client destroys the xdg_popup. This can be done by the user clicking - outside the surface, using the keyboard, or even locking the screen - through closing the lid or a timeout. - - If the compositor denies the grab, the popup will be immediately - dismissed. - - This request must be used in response to some sort of user action like a - button press, key press, or touch down event. The serial number of the - event should be passed as 'serial'. - - The parent of a grabbing popup must either be an xdg_toplevel surface or - another xdg_popup with an explicit grab. If the parent is another - xdg_popup it means that the popups are nested, with this popup now being - the topmost popup. - - Nested popups must be destroyed in the reverse order they were created - in, e.g. the only popup you are allowed to destroy at all times is the - topmost one. - - When compositors choose to dismiss a popup, they may dismiss every - nested grabbing popup as well. When a compositor dismisses popups, it - will follow the same dismissing order as required from the client. - - The parent of a grabbing popup must either be another xdg_popup with an - active explicit grab, or an xdg_popup or xdg_toplevel, if there are no - explicit grabs already taken. - - If the topmost grabbing popup is destroyed, the grab will be returned to - the parent of the popup, if that parent previously had an explicit grab. - - If the parent is a grabbing popup which has already been dismissed, this - popup will be immediately dismissed. If the parent is a popup that did - not take an explicit grab, an error will be raised. - - During a popup grab, the client owning the grab will receive pointer - and touch events for all their surfaces as normal (similar to an - "owner-events" grab in X11 parlance), while the top most grabbing popup - will always have keyboard focus. - - - - - - - - This event asks the popup surface to configure itself given the - configuration. The configured state should not be applied immediately. - See xdg_surface.configure for details. - - The x and y arguments represent the position the popup was placed at - given the xdg_positioner rule, relative to the upper left corner of the - window geometry of the parent surface. - - - - - - - - - - The popup_done event is sent out when a popup is dismissed by the - compositor. The client should destroy the xdg_popup object at this - point. - - - - - diff --git a/src/server/CMakeLists.txt b/src/server/CMakeLists.txt index c8860c3..3263108 100644 --- a/src/server/CMakeLists.txt +++ b/src/server/CMakeLists.txt @@ -1,370 +1,370 @@ set(SERVER_LIB_SRCS appmenu_interface.cpp buffer_interface.cpp clientconnection.cpp compositor_interface.cpp datadevice_interface.cpp datadevicemanager_interface.cpp dataoffer_interface.cpp datasource_interface.cpp display.cpp dpms_interface.cpp filtered_display.cpp global.cpp idle_interface.cpp idleinhibit_interface.cpp idleinhibit_interface_v1.cpp fakeinput_interface.cpp keyboard_interface.cpp keystate_interface.cpp remote_access_interface.cpp outputconfiguration_interface.cpp outputchangeset.cpp outputmanagement_interface.cpp outputdevice_interface.cpp output_interface.cpp pointer_interface.cpp plasmashell_interface.cpp plasmavirtualdesktop_interface.cpp plasmawindowmanagement_interface.cpp pointerconstraints_interface.cpp pointerconstraints_interface_v1.cpp pointergestures_interface.cpp pointergestures_interface_v1.cpp qtsurfaceextension_interface.cpp region_interface.cpp relativepointer_interface.cpp relativepointer_interface_v1.cpp resource.cpp seat_interface.cpp slide_interface.cpp shadow_interface.cpp blur_interface.cpp contrast_interface.cpp server_decoration_interface.cpp server_decoration_palette_interface.cpp shell_interface.cpp surface_interface.cpp subcompositor_interface.cpp touch_interface.cpp textinput_interface.cpp textinput_interface_v0.cpp textinput_interface_v2.cpp xdgdecoration_interface.cpp xdgshell_interface.cpp xdgshell_v5_interface.cpp xdgforeign_v2_interface.cpp xdgforeign_interface.cpp xdgshell_v5_interface.cpp xdgshell_v6_interface.cpp xdgshell_stable_interface.cpp xdgoutput_interface.cpp eglstream_controller_interface.cpp ../compat/wayland-xdg-shell-v5-protocol.c ) ecm_qt_declare_logging_category(SERVER_LIB_SRCS HEADER logging.h IDENTIFIER KWAYLAND_SERVER CATEGORY_NAME kwayland-server DEFAULT_SEVERITY Critical) ecm_add_wayland_server_protocol(SERVER_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/output-management.xml BASENAME output-management ) ecm_add_wayland_server_protocol(SERVER_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/outputdevice.xml BASENAME org_kde_kwin_outputdevice ) ecm_add_wayland_server_protocol(SERVER_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/plasma-shell.xml BASENAME plasma-shell ) ecm_add_wayland_server_protocol(SERVER_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/plasma-virtual-desktop.xml BASENAME plasma-virtual-desktop ) ecm_add_wayland_server_protocol(SERVER_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/plasma-window-management.xml BASENAME plasma-window-management ) ecm_add_wayland_server_protocol(SERVER_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/surface-extension.xml BASENAME qt-surface-extension ) ecm_add_wayland_server_protocol(SERVER_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/idle.xml BASENAME idle ) ecm_add_wayland_server_protocol(SERVER_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/fake-input.xml BASENAME fake-input ) ecm_add_wayland_server_protocol(SERVER_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/shadow.xml BASENAME shadow ) ecm_add_wayland_server_protocol(SERVER_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/dpms.xml BASENAME dpms ) ecm_add_wayland_server_protocol(SERVER_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/blur.xml BASENAME blur ) ecm_add_wayland_server_protocol(SERVER_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/contrast.xml BASENAME contrast ) ecm_add_wayland_server_protocol(SERVER_LIB_SRCS - PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/relative-pointer-unstable-v1.xml + PROTOCOL ${WaylandProtocols_DATADIR}/unstable/relative-pointer/relative-pointer-unstable-v1.xml BASENAME relativepointer-unstable-v1 ) ecm_add_wayland_server_protocol(SERVER_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/slide.xml BASENAME slide ) ecm_add_wayland_server_protocol(SERVER_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/server-decoration.xml BASENAME server_decoration ) ecm_add_wayland_server_protocol(SERVER_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/text-input.xml BASENAME text ) ecm_add_wayland_server_protocol(SERVER_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/text-input-unstable-v2.xml BASENAME text-input-unstable-v2 ) ecm_add_wayland_server_protocol(SERVER_LIB_SRCS - PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/xdg-shell-unstable-v6.xml + PROTOCOL ${WaylandProtocols_DATADIR}/unstable/xdg-shell/xdg-shell-unstable-v6.xml BASENAME xdg-shell-v6 ) ecm_add_wayland_server_protocol(SERVER_LIB_SRCS - PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/pointer-gestures-unstable-v1.xml + PROTOCOL ${WaylandProtocols_DATADIR}/unstable/pointer-gestures/pointer-gestures-unstable-v1.xml BASENAME pointer-gestures-unstable-v1 ) ecm_add_wayland_server_protocol(SERVER_LIB_SRCS - PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/pointer-constraints-unstable-v1.xml + PROTOCOL ${WaylandProtocols_DATADIR}/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml BASENAME pointer-constraints-unstable-v1 ) ecm_add_wayland_server_protocol(SERVER_LIB_SRCS - PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/xdg-foreign-unstable-v2.xml + PROTOCOL ${WaylandProtocols_DATADIR}/unstable/xdg-foreign/xdg-foreign-unstable-v2.xml BASENAME xdg-foreign-unstable-v2 ) ecm_add_wayland_server_protocol(SERVER_LIB_SRCS - PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/idle-inhibit-unstable-v1.xml + PROTOCOL ${WaylandProtocols_DATADIR}/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml BASENAME idle-inhibit-unstable-v1 ) ecm_add_wayland_server_protocol(SERVER_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/appmenu.xml BASENAME appmenu ) ecm_add_wayland_server_protocol(SERVER_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/server-decoration-palette.xml BASENAME server_decoration_palette ) ecm_add_wayland_server_protocol(SERVER_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/remote-access.xml BASENAME remote-access ) ecm_add_wayland_server_protocol(SERVER_LIB_SRCS - PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/xdg-output-unstable-v1.xml + PROTOCOL ${WaylandProtocols_DATADIR}/unstable/xdg-output/xdg-output-unstable-v1.xml BASENAME xdg-output ) ecm_add_wayland_server_protocol(SERVER_LIB_SRCS - PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/xdg-shell.xml + PROTOCOL ${WaylandProtocols_DATADIR}/stable/xdg-shell/xdg-shell.xml BASENAME xdg-shell ) ecm_add_wayland_server_protocol(SERVER_LIB_SRCS - PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/xdg-decoration-unstable-v1.xml + PROTOCOL ${WaylandProtocols_DATADIR}/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml BASENAME xdg-decoration ) ecm_add_wayland_server_protocol(SERVER_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/wayland-eglstream-controller.xml BASENAME eglstream-controller ) ecm_add_wayland_server_protocol(SERVER_LIB_SRCS PROTOCOL ${KWayland_SOURCE_DIR}/src/client/protocols/keystate.xml BASENAME keystate ) set(SERVER_GENERATED_SRCS ${CMAKE_CURRENT_BINARY_DIR}/wayland-output-management-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-output-management-server-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-org_kde_kwin_outputdevice-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-org_kde_kwin_outputdevice-server-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-plasma-shell-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-plasma-shell-server-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-plasma-shell-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-plasma-virtual-desktop-server-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-plasma-virtual-desktop-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-plasma-window-management-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-plasma-window-management-server-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-qt-surface-extension-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-qt-surface-extension-server-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-idle-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-idle-server-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-fake-input-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-fake-input-server-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-shadow-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-shadow-server-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-dpms-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-dpms-server-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-blur-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-blur-server-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-contrast-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-contrast-server-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-relativepointer-unstable-v1-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-relativepointer-unstable-v1-server-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-slide-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-slide-server-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-server_decoration-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-server_decoration-server-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-server_decoration_palette-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-server_decoration_palette-server-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-text-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-text-server-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-text-input-unstable-v2-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-text-input-unstable-v2-server-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-xdg-shell-v6-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-xdg-shell-v6-server-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-xdg-shell-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-xdg-shell-server-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-pointer-gestures-unstable-v1-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-pointer-gestures-unstable-v1-server-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-pointer-constraints-unstable-v1-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-pointer-constraints-unstable-v1-server-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-xdg-foreign-unstable-v2-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-xdg-foreign-unstable-v2-server-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-idle-inhibit-unstable-v1-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-idle-inhibit-unstable-v1-server-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-output-unstable-v1-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-output-unstable-v1-server-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-output-unstable-v1-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-xdg-decoration-server-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-xdg-decoration-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR}/wayland-eglstream-controller-server-protocol.h ) set_source_files_properties(${SERVER_GENERATED_SRCS} PROPERTIES SKIP_AUTOMOC ON) add_library(KF5WaylandServer ${SERVER_LIB_SRCS}) generate_export_header(KF5WaylandServer BASE_NAME KWaylandServer EXPORT_FILE_NAME KWayland/Server/kwaylandserver_export.h ) add_library(KF5::WaylandServer ALIAS KF5WaylandServer) target_include_directories(KF5WaylandServer INTERFACE "$") target_link_libraries(KF5WaylandServer PUBLIC Qt5::Gui PRIVATE Wayland::Server EGL::EGL Qt5::Concurrent ) set_target_properties(KF5WaylandServer PROPERTIES VERSION ${KWAYLAND_VERSION_STRING} SOVERSION ${KWAYLAND_SOVERSION} EXPORT_NAME WaylandServer ) install(TARGETS KF5WaylandServer EXPORT KF5WaylandTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS}) set(SERVER_LIB_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/KWayland/Server/kwaylandserver_export.h appmenu_interface.h blur_interface.h contrast_interface.h buffer_interface.h clientconnection.h compositor_interface.h datadevice_interface.h datadevicemanager_interface.h dataoffer_interface.h datasource_interface.h display.h dpms_interface.h eglstream_controller_interface.h filtered_display.h fakeinput_interface.h global.h idle_interface.h idleinhibit_interface.h keyboard_interface.h keystate_interface.h remote_access_interface.h outputdevice_interface.h outputchangeset.h outputconfiguration_interface.h outputmanagement_interface.h output_interface.h pointer_interface.h pointerconstraints_interface.h pointergestures_interface.h plasmashell_interface.h plasmavirtualdesktop_interface.h plasmawindowmanagement_interface.h qtsurfaceextension_interface.h region_interface.h relativepointer_interface.h resource.h seat_interface.h server_decoration_interface.h server_decoration_palette_interface.h shadow_interface.h shell_interface.h slide_interface.h subcompositor_interface.h surface_interface.h textinput_interface.h touch_interface.h xdgdecoration_interface.h xdgshell_interface.h xdgforeign_interface.h xdgoutput_interface.h ) install(FILES ${SERVER_LIB_HEADERS} DESTINATION ${KF5_INCLUDE_INSTALL_DIR}/KWayland/Server COMPONENT Devel ) # make available to ecm_add_qch in parent folder set(KWaylandServer_APIDOX_SRCS ${SERVER_LIB_HEADERS} PARENT_SCOPE) include(ECMGeneratePriFile) ecm_generate_pri_file(BASE_NAME KWaylandServer LIB_NAME KF5WaylandServer DEPS "core" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}) install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})