forked from 12to11/12to11
No description
![]() * 12to11.c (HandleCmdline): New function. (XLMain): Handle locale, initialize text input and and set up the resource database. * 12to11.man: Document resources and command-line arguments. * Imakefile (SRCS, OBJS): Add text_input.c and text_input.o. (text-input-unstable-v3): New scanner target. * README: Document support for zwp_text_input_manager_v3. * alloc.c (XLMalloc, XLCalloc, XLRealloc): Allow alloc of size 0 to return NULL. * atoms.c (resource_quark, app_quark, QString): New quarks. (XLInitAtoms): Initialize some quarks. * compositor.h (struct _Compositor): Add resource and app names. (struct _RoleFuncs): Add `select_extra_events'. (struct _TextInputFuncs): New structure. * run.c (HandleOneXEvent): Filter events if necessary. * seat.c (AllKeyMask): New define. (input_funcs): New variable. (MakeSeatForDevicePair, NoticeDeviceDisabled): Always assign a single seat the role of "text input seat". (ClearFocusSurface, SetFocusSurface): Call input method hooks. (HackKeyboardModifiers): New function. (DispatchKey): Ignore repeated key events. (XLSeatGetFocus): New function. (XLSeatSetTextInputFuncs, XLSeatGetKeyboardDevice) (XLSeatGetInputMethodSeat, XLSeatDispatchCoreKeyEvent): New function. * surface.c (XLSurfaceSelectExtraEvents): New function. * xdg_surface.c (DefaultEventMask): Add core event mask here. (XLHandleXEventForXdgSurfaces): Handle core key events. (Commit, NoteBounds): Improve debug code. (SelectExtraEvents): New function. (XLGetXdgSurface, XLXdgRoleSetBoundsSize): Improve debug code. (XLInitXdgSurfaces): Reduce size of assoc table. * xdg_toplevel.c (SendConfigure, SendDecorationConfigure, Map) (HandleConfigureEvent, SetMode, UnsetMode): Avoid sending decoration configure before initial commit. |
||
---|---|---|
12to11.c | ||
12to11.man | ||
alloc.c | ||
atoms.c | ||
buffer.c | ||
compositor.c | ||
compositor.h | ||
data_device.c | ||
decoration.c | ||
dmabuf.c | ||
dnd.c | ||
egl.c | ||
ewmh.c | ||
explicit_synchronization.c | ||
fns.c | ||
frame_clock.c | ||
icon_surface.c | ||
Imakefile | ||
libraries.def | ||
linux-dmabuf-unstable-v1.xml | ||
linux-explicit-synchronization-unstable-v1.xml | ||
media_types.txt | ||
mime0.awk | ||
mime1.awk | ||
mime2.awk | ||
mime3.awk | ||
mime4.awk | ||
output.c | ||
picture_renderer.c | ||
positioner.c | ||
primary-selection-unstable-v1.xml | ||
primary_selection.c | ||
README | ||
region.c | ||
renderer.c | ||
run.c | ||
seat.c | ||
select.c | ||
shaders.awk | ||
shaders.txt | ||
shm.c | ||
subcompositor.c | ||
subsurface.c | ||
surface.c | ||
text-input-unstable-v3.xml | ||
text_input.c | ||
timer.c | ||
transform.c | ||
viewporter.xml | ||
wp_viewporter.c | ||
xdata.c | ||
xdg-decoration-unstable-v1.xml | ||
xdg-shell.xml | ||
xdg_popup.c | ||
xdg_surface.c | ||
xdg_toplevel.c | ||
xdg_wm.c | ||
xerror.c | ||
xsettings.c |
This is a tool for running Wayland applications on an X server, preferably with a compositing manager running. It is not yet complete. What is not yet implemented includes support for touchscreens, input methods, device switching in dmabuf feedback, and the single-pixel buffer protocol extension. There are also problems with output reporting in subsurfaces. It is not portable to systems other than recent versions of GNU/Linux running the X.Org server 1.20 or later, and has not been tested on window (and compositing) managers other than GNOME Shell. It will not work very well unless the compositing manager supports the EWMH frame synchronization protocol. Building and running this tool requires the following X protocol extensions: Nonrectangular Window Shape Extension, version 1.1 or later MIT Shared Memory Extension, version 1.2 or later X Resize, Rotate and Reflect Extension, version 1.3 or later (this will soon be 1.4, once support for multiple GPU systems is fully implemented) X Synchronization Extension, version 1.0 or later X Rendering Extension, version 1.2 or later X Input Extension, version 2.3 or later Direct Rendering Interface 3, version 1.2 or later X Fixes Extension, version 1 or later In addition, it requires Xlib to be built with the XCB transport, and the XCB bindings for MIT-SHM and DRI3 to be available. Sometimes, it might be desirable to build with EGL, and use OpenGL ES 2.0 for i.e. YUV video format support. To do so, uncomment the block of code for EGL support in libraries.def before running `xmkmf'. This will additionally require the EGL and GLESv2 development files, and for the following EGL and GLES extensions to be present at runtime: EGL_EXT_platform_base EGL_EXT_device_query EGL_KHR_image_base EGL_EXT_image_dma_buf_import_modifiers EGL_EXT_image_dma_buf_import EGL_EXT_buffer_age GL_OES_EGL_image GL_OES_EGL_image_external GL_EXT_read_format_bgra GL_EXT_unpack_subimage After building with EGL support, the renderer must be enabled by setting the environment variable "RENDERER" to "egl". The following Wayland protocols are implemented to a more-or-less complete degree: 'wl_output', version: 2 'wl_compositor', version: 5 'wl_shm', version: 1 'xdg_wm_base', version: 5 'wl_subcompositor', version: 1 'wl_seat', version: 7 'wl_data_device_manager', version: 3 'zwp_linux_dmabuf_v1', version: 4 'zwp_primary_selection_device_manager_v1', version: 1 'wp_viewporter', version: 1 'zxdg_decoration_manager_v1', version: 1 'zwp_text_input_manager_v3', version: 1 When built with EGL, the following Wayland protocol is also supported: 'zwp_linux_explicit_synchronization_v1', version: 2 With the main caveat being that zwp_linux_dmabuf_v1 has no real support for multiple-provider setups (help wanted). Window decorations are also not supported, even though they fit in nicely with X window management. It would also be nice to have pinch gesture support. This directory is organized as follows: Imakefile - the top level Makefile template libraries.def - files for libraries that don't provide Imakefiles *.xml - Wayland protocol definition source *.c, *.h - C source code *.awk - scripts used to generate headers *.txt - text data used to generate some headers, i.e. those containing MIME types or shaders Building the source code is simple, provided that you have the necessary libwayland-server library, pixman, XCB, and X extension libraries installed: xmkmf # to generate the Makefile make # to build the binary wayland-scanner is also required when building from the repository. Running the binary should be simple as well: ./12to11 Wayland programs will then run as regular X windows.