forked from 12to11/12to11

* 12to11.c (HandleCmdline): Improve messages printed during -help. (XLMain): Initialize DRM leasing. * 12to11.man: Document changes. * Imakefile (LOCAL_LIBRARIES): Add xcb-randr, xf86drm and XPresent. (SRCS): Add drm_lease.c. (OBJS): Add drm_lease.o. * atoms.c (names): Add CONNECTOR_ID. (CONNECTOR_ID): New atom. (XLInitAtoms): Intern CONNECTOR_ID. * compositor.h (struct _RenderFuncs): Require event mask to be passed to target_from_window. New functions `set_standard_event_mask', `present_to_window', `cancel_presentation_callback', and `cancel_presentation'. (struct _BufferFuncs): Move buffer release machinery here. (enum _FrameMode): New enum. * egl.c (TargetFromWindow, SetStandardEventMask, egl_render_funcs): Adjust functions accordingly. * frame_clock.c (struct _FrameClock): New fields `end_frame_called' and `pending_sync_value'. (HandleEndFrame, PostEndFrame, StartFrame, EndFrame): Clean up frame synchronization code. Do not end upon predicted presentation time if EndFrame was not called in time. (FreezeForValue): New function. (XLFrameClockHandleFrameEvent): Defer actually freezing until StartFrame happens. (XLFrameClockGetFrameTime): New function. * icon_surface.c (ReleaseBuffer): Use RenderWaitForIdle. (RunFrameCallbacks, AfterFrame): Pass frame clock to callbacks. Use frame time if available. (XLGetIconSurface): Require wait_for_idle to work. * output.c (change_hook): New hook. (XLHandleOneXEventForOutputs): Run hook if set. (XLOutputSetChangeFunction): New function. (XLInitRROutputs): Select for RRResourceChangeNotify if providers are supported. * picture_renderer.c (struct _PresentRecord) (struct _BufferActivityRecord, struct _IdleCallback) (struct _PictureBuffer, struct _PictureTarget) (struct _DrmFormatInfo, struct _DmaBufRecord) (struct _PresentCompletionCallback): New record structures. (all_formats, SendRoundtripMessage, FindBufferActivityRecord) (RecordBufferActivity, RunIdleCallbacks, MaybeRunIdleCallbacks) (UnlinkActivityRecord, HandleActivityEvent, InitRenderFuncs) (TargetFromDrawable, TargetFromPixmap, TargetFromWindow) (SetStandardEventMask, NoteTargetSize, PictureFromTarget) (DestroyRenderTarget, FillBoxesWithTransparency) (ServerRegionFromRegion, ClearRectangle, Composite) (FindPresentRecord, AllocateRecord, PresentToWindow) (CancelPresentationCallback, CancelPresentation) (picture_render_funcs, FindSupportedModifiers, InitDrmFormats) (PictFormatIsPresentable, BufferFromDmaBuf, FinishDmaBufRecord) (BufferFromDmaBufAsync, BufferFromShm, BufferFromSinglePixel) (FreeShmBuffer, FreeDmabufBuffer, FreeSinglePixelBuffer) (AddIdleCallback, CancelIdleCallback, IsBufferIdle) (IdleEventPredicate, WaitForIdle, SetNeedWaitForIdle) (picture_buffer_funcs, HandlePresentCompleteNotify) (HandlePresentIdleNotify, HandlePresentationEvent) (HandleOneXEventForPictureRenderer, InitPictureRenderer): Allow presenting pixmaps directly, and move buffer release tracking machinery here. * renderer.c (RenderTargetFromWindow): Update signature. (RenderPresentToWindow, RenderCancelPresentationCallback) (RenderCancelPresentation, RenderAddIdleCallback) (RegisterStaticRenderer): New wrapper functions. * run.c (HandleOneXEvent): Handle picture renderer events earlier. * seat.c (MaybeCreateCursor): Require wait_for_idle. (ReleaseBuffer): Wait for buffer to become idle on each target in the cursor ring. * subcompositor.c (struct _Subcompositor): New callback `note_frame'. (SubcompositorSetNoteFrameCallback, NoViewsAfter) (PresentCompletedCallback): New functions. (SubcompositorUpdate): Try to present the buffer if possible, and run completion callbacks. (SubcompositorFree): Free presentation key. * surface.c (XLSurfaceRunFrameCallbacksMs): New function. * text_input.c: Improve commentary. * xdg-shell.xml: Update from wayland-protocols. * xdg_surface.c (struct _XdgRole): New fields `pending_frame', `last_specified_serial'. (struct _ReleaseLaterRecord): Replace free function with idle callback key and xdg role pointers. (RemoveRecord): Delete function. (FreeRecords): Stop cancelling buffer destroy listener. (ReleaseLaterExtBufferFunc): Delete function. (RunFrameCallbacks): Use frame clock time if it is set. (HandleReleaseLaterMessage): Delete function. (BufferIdleCallback): New function. (ReleaseLater): Delete function. (XLHandleXEventForXdgSurfaces): Stop handling buffer release events here. (AckConfigure): Improve debug code and reject duplicate serials. (Commit): Unfreeze earlier; also, in general... (NoteFrame): Move frame handling implementation here. (ReleaseBuffer, Subframe, EndSubframe, AfterFrame, ResizeForMap) (SelectExtraEvents): Set standard event mask. (XLGetXdgSurface, XLXdgRoleSendConfigure): ...Replace frame clock logic with that in NoteFrame.
256 lines
8.7 KiB
Groff
256 lines
8.7 KiB
Groff
.TH 12to11
|
|
.SH NAME
|
|
12to11 - Wayland to X protocol translator
|
|
.SH SYNOPSIS
|
|
.B 12to11
|
|
[\-\fBclass\fP \fIclass\fP] [\-\fBname\fP \fIname\fP] [\-\fBxrm\fP \fIresourcestring\fP...]
|
|
.SH DESCRIPTION
|
|
.I 12to11
|
|
starts a Wayland compositor on the next available socket;
|
|
Wayland programs will then be displayed through the X server.
|
|
.SH OPTIONS
|
|
Some X Toolkit library-style command-line arguments are also accepted,
|
|
despite the protocol translator being implemented without using a
|
|
toolkit. These options are:
|
|
.TP 8
|
|
.B \-class \fIclass\fP
|
|
This option specifies the resource class under which resources are to
|
|
be obtained. When not set, it defaults to the string ``12to11''. The
|
|
resource class and name used by the protocol translator are \fInot\fP
|
|
set as the
|
|
.B WM_CLASS
|
|
property on windows created by the protocol translator; instead, those
|
|
windows get the classes and names assigned to them by their individual
|
|
Wayland clients.
|
|
.TP 8
|
|
.B \-name \fIname\fP
|
|
This option specifies the instance name under which resources are to
|
|
be obtained. When not set, it defaults to the executable file name.
|
|
.TP
|
|
.B \-help\fP
|
|
This option causes the protocol translator to print a message
|
|
describing options it accepts. The protocol translator will then exit
|
|
after printing the message.
|
|
.TP
|
|
.B \-xrm\fP \fIresourcestring\fP
|
|
This option specifies a resource string to be used. This is
|
|
especially useful for setting resources that do not have separate
|
|
command line options.
|
|
.SH RESOURCES
|
|
\fI12to11\fP understands some resource names and classes that can be
|
|
used to specify various settings that affect its behavior. Those
|
|
resources are listed below:
|
|
.TP 8
|
|
.B ximFont\fP (class \fBXimFont\fP)
|
|
Specifies the font to be used for displaying the preedit or status
|
|
areas of an input method.
|
|
.IP
|
|
In many input methods, the preedit (a.k.a composition or
|
|
preconversion) string and/or a status window is displayed on screen
|
|
while typing by the input method server. The client is supposed to
|
|
determine the font used by the input method server to display --
|
|
however, the Wayland protocol does not allow Wayland clients to
|
|
specify that themselves, so the protocol translator has to do that by
|
|
itself.
|
|
.TP
|
|
.B ximStyles\fP (class \fBXimStyles\fP)
|
|
Specifies the default input method styles used by the protocol
|
|
translator.
|
|
.IP
|
|
X input methods can support different editing styles, which affect how
|
|
preconversion and status text is displayed while typing. These styles
|
|
are named:
|
|
.TP 16
|
|
.B overTheSpot
|
|
In ``over the spot'', the preedit string is displayed in a window
|
|
created by the input method at a location specified by the Wayland
|
|
client, typically the text insertion point.
|
|
.TP
|
|
.B offTheSpot
|
|
In ``off the spot'', the preedit string is displayed in a window
|
|
created by the input method at some location away from the text
|
|
insertion point. Often, this type of window is placed at the bottom
|
|
of the preedit window.
|
|
.TP
|
|
.B rootWindow
|
|
In the ``root window'' editing style, the preedit string is displayed
|
|
in a popup window created by the input method.
|
|
.TP
|
|
.B onTheSpot
|
|
In the ``on the spot'' editing style, the preedit string is displayed
|
|
inside the text itself by the Wayland client.
|
|
.IP "" 8
|
|
Not all input methods support all editing styles. In the real world,
|
|
most only support one or two of the styles listed above. The protocol
|
|
translator will search for a style supported by the input method when
|
|
initializing input method support. The \fBximStyles\fP resource is
|
|
used to control the order in which the protocol translator searches
|
|
for input styles, and should be a comma separated list of input names,
|
|
which are searched in left-to-right order. For example,
|
|
.IP
|
|
.in +4
|
|
.EX
|
|
\fBoverTheSpot,rootWindow\fP
|
|
.EE
|
|
.in
|
|
.IP
|
|
will result in the protocol translator searching for the ``over the
|
|
spot'' input style, and if that is not present, the ``root window''
|
|
style. Whitespace must not be present inside the comma-separated
|
|
list. When \fBximStyles\fP is not specified, it defaults to:
|
|
.IP
|
|
.in +4
|
|
.EX
|
|
\fBoverTheSpot,offTheSpot,rootWindow,onTheSpot\fP
|
|
.EE
|
|
.in
|
|
.TP
|
|
.B renderer \fP (class \fBRenderer\fP)
|
|
Specifies the rendering backend the protocol translator uses to
|
|
composite the contents of Wayland surfaces onto X windows. This can
|
|
either be \fBpicture\fP (the XRender based compositor) or \fBegl\fP
|
|
(the OpenGL ES 2.0 based compositor).
|
|
.SH ENVIRONMENT
|
|
Several environment variables exist that modify the behavior of the
|
|
protocol translator in one way or another. Most of these are used for
|
|
debugging, but some may be relevant to users as well.
|
|
.PP
|
|
The
|
|
.B USE_BUILTIN_RESIZE
|
|
environment variable, if set, forces the use of the built-in
|
|
drag-to-resize support provided by the protocol translator, even if
|
|
the X window manager provides its own.
|
|
.PP
|
|
The
|
|
.B DEBUG_REFRESH_PREDICTION
|
|
environment variable, if set, forces the frame clock to predict the
|
|
presentation deadline of the X compositing manager. This is used to
|
|
debug code that is otherwise not run without subsurfaces being
|
|
present.
|
|
.PP
|
|
The
|
|
.B DISABLE_FRAME_SYNCHRONIZATION
|
|
environment variable, if set, disables frame synchronization with the
|
|
X compositing manager. Setting this variable is probably not a good
|
|
idea.
|
|
.PP
|
|
The
|
|
.B SYNCHRONIZE
|
|
environment variable, if set, causes the X library to check for errors
|
|
immediately after issuing a request. The resulting backtraces from
|
|
the error handler then reflect the protocol request that actually
|
|
caused the error, instead of some unpredictable request in the future.
|
|
.PP
|
|
The
|
|
.B APPLY_STATE_WORKAROUND
|
|
environment variable, if set, causes the protocol translator to handle
|
|
toplevel window state changes differently. If Wayland programs do not
|
|
make the transition between fullscreen and maximized states correctly,
|
|
try setting this variable.
|
|
.PP
|
|
The
|
|
.B GLOBAL_SCALE
|
|
environment variable, if set to an integer, overrides the global
|
|
program scale factor normally provided by the
|
|
.I Gdk/WindowScalingFactor
|
|
X setting.
|
|
.PP
|
|
The
|
|
.B OUTPUT_SCALE
|
|
environment variable, if set to an integer, overrides the output scale
|
|
factor that is otherwise set to the global program scale factor.
|
|
Setting this option is only useful to debug Wayland program
|
|
downscaling.
|
|
.PP
|
|
The
|
|
.B DIRECT_STATE_CHANGES
|
|
variable, if set, forces ConfigureNotify events from the window
|
|
manager to be handled directly, without waiting some time for a
|
|
corresponding _NET_WM_STATE event to arrive. This is only
|
|
useful for debugging the window resizing logic.
|
|
.PP
|
|
The
|
|
.B RENDERER
|
|
variable, if set, controls the rendering backend used by the
|
|
protocol translator. When set to
|
|
.I help
|
|
it prints a list of available rendering backends instead. This takes
|
|
precedence over the \fBrenderer\fP resource whenever set.
|
|
.PP
|
|
The
|
|
.B RENDER_VISUAL
|
|
variable, if set to a number, contains the ID of the visual used
|
|
when the EGL rendering backend is in use.
|
|
.SH "CONFORMING TO"
|
|
The protocol translator aims to comply with the specifications of the
|
|
following Wayland interfaces:
|
|
.TS H
|
|
lb lb
|
|
lb n .
|
|
Protocol Version
|
|
wl_output 2
|
|
wl_compositor 5
|
|
wl_shm 1
|
|
xdg_wm_base 5
|
|
wl_subcompositor 1
|
|
wl_seat 7
|
|
wl_data_device_manager 3
|
|
zwp_linux_dmabuf_v1 4
|
|
zwp_primary_selection_device_manager_v1 1
|
|
wp_viewporter 1
|
|
zxdg_decoration_manager_v1 1
|
|
zwp_text_input_manager_v3 1
|
|
wp_single_pixel_buffer_manager_v1 1
|
|
.TE
|
|
.PP
|
|
When the protocol translator is built with EGL support, the following
|
|
protocol is also supported:
|
|
.TS H
|
|
lb lb
|
|
lb n .
|
|
Protocol Version
|
|
zwp_linux_explicit_synchronization_v1 2
|
|
.TE
|
|
.PP
|
|
When the X server supports version 1.6 or later of the X Resize,
|
|
Rotate and Reflect Extension, the following Wayland protocol is also
|
|
supported:
|
|
.TS H
|
|
lb lb
|
|
lb n .
|
|
Protocol Version
|
|
wp_drm_lease_device_v1 1
|
|
.TE
|
|
.PP
|
|
However, Wayland clients are allowed to continue to access data from
|
|
the \fBCLIPBOARD\fP and \fBPRIMARY\fP selections even when they do not
|
|
have the keyboard focus, against the restrictions put out in the
|
|
relevant protocol specifications. It is the opinion of the authors
|
|
that such ``security'' does not come with any real benefit.
|
|
.SH BUGS
|
|
There is a hard to catch bug where Wayland programs leaving the
|
|
fullscreen or maximized state may abruptly return to their maximized
|
|
size. Setting the
|
|
.B APPLY_STATE_WORKAROUND
|
|
environment variable may help.
|
|
.PP
|
|
Mozilla Firefox also does not work correctly. Resizing the Firefox
|
|
window leads to screen tearing, and Firefox often resizes its toplevel
|
|
windows outside their normal boundaries, causing invalid screen
|
|
contents to be displayed over other applications.
|
|
.PP
|
|
Using this protocol translator under a window manager that does not at
|
|
least support the
|
|
.B _NET_WM_SYNC_REQUEST
|
|
and
|
|
.B _NET_WM_STATE
|
|
window manager hints will result in Wayland programs running
|
|
incorrectly.
|
|
.PP
|
|
In addition, surfaces transforms are not supported nor reported. The
|
|
vast majority of clients seem not to make use of this feature, and
|
|
implementing it would be a lot of trouble.
|
|
.SH "SEE ALSO"
|
|
X(7), Xorg(1)
|
|
.SH AUTHORS
|
|
Various contributors.
|