forked from 12to11/12to11

* 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.
194 lines
6.8 KiB
Groff
194 lines
6.8 KiB
Groff
.TH 12to11
|
|
.SH NAME
|
|
12to11 - Wayland to X protocol translator
|
|
.SH SYNOPSIS
|
|
.B 12to11
|
|
[\-\fIclass\fP class] [\-\fIname\fP name]
|
|
.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 8
|
|
.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.
|
|
.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
|
|
.I 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
|
|
.I 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
|
|
.I rootWindow
|
|
In the ``root window'' editing style, the preedit string is displayed
|
|
in a popup window created by the input method.
|
|
.TP
|
|
.I onTheSpot
|
|
In the ``on the spot'' editing style, the preedit string is displayed
|
|
inside the text itself by the Wayland client.
|
|
.PP
|
|
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,
|
|
.PP
|
|
.in +4
|
|
.EX
|
|
\fBoverTheSpot,rootWindow\fP
|
|
.EE
|
|
.in
|
|
.PP
|
|
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:
|
|
.PP
|
|
.in +4
|
|
.EX
|
|
\fBoverTheSpot,offTheSpot,rootWindow,onTheSpot\fP
|
|
.EE
|
|
.in
|
|
.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.
|
|
.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 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.
|
|
.SH "SEE ALSO"
|
|
X(7), Xorg(1)
|
|
.SH AUTHOR
|
|
Various contributors.
|