By Nathan Willis
May 2, 2012
The Wayland display server may grab more headlines these days, but
that does not mean that X is sitting still. In fact, the X.org Foundation
is due to release X11R7.7 shortly, with a host of new input and display features.
The last major release of the X Window System was X11R7.6, from December 2010. The modular design of X releases (adopted with X11R7.0)
means that different parts of the source tree evolve at different paces;
consequently it can be a little work to sort out precisely what
improvements land with each full release. Release manager Alan
Coopersmith recently
posted a draft of the upcoming release notes, though, which gives
a concise summary of the changes slated to arrive.
The XInput2 extension (XI2) is a highly-visible example of important,
user-facing changes that land via extensions rather than in the core.
XI2 2.2 added multi-touch input
earlier this year; a long-awaited feature implemented by Peter
Hutterer that enables the X server to recognize multiple input points
from a single hardware device, thus allowing applications to interpret
simultaneous input events, such as gestures. It also defines touch
event sequences and cleanly differentiates between touch-sensitive
input devices like trackpads and touch-sensitive screens. Both are
enhancements that will prove useful as application toolkits like GTK+
and Qt make moves into the consumer tablet space.
But XI2 2.1 was also released between X11R7.6 and now, bringing
with it a large patch
set from Daniel Stone that improves the smooth-scrolling behavior. Other changes added
a way for applications to track raw
device events (largely of interest to game controllers), and added several missing
defines to the XI2 API. The latter issue was that XI2 provided
some-but-not-all defines in its own XI* namespace, and
programmers were forced to fall back on core defines to keep track of
other constants, such as AnyPropertyType or
GrabSuccess. Falling back on such core defines is bad style,
particularly because it was easy to accidentally do so when a relevant
XI2 define did exist (such as using AnyModifier
instead of XIAnyModifier), which would cause the program to break.
New features for client applications
The X
Fixes extension adds the notion of "pointer barriers" in this
release. The feature is derived from applications' desire to set
easy-to-reach targets as active regions on the screen — such as
the upper-left-corner of the display, which is used by several desktop
environments to activate a "dashboard" style overlay. While
monitoring the upper-left corner is child's play in a single monitor
setup, the task becomes trickier with multiple displays. Some
developers might want the upper-left-corner of the right-hand display
— which is physically in the middle of the combined screen
— to retain its active target status and still be easily
reachable. Pointer barriers allow them to do so, by giving the
desired target region some "friction" (for lack of a better
term) that constrains pointer motion; the result is that the cursor
slows down when it hits the target area, making it more difficult to overshoot.
The X Synchronization extension (XSync) now allows client
applications to create "fence" objects that they can use to
synchronize different rendering back-ends in use at the same time.
This is important because not all renderers function at the same speed
— such as when OpenGL is used to render only one portion of the
client window. X is normally oblivious to this reality, but, as Aaron
Plattner explained it when the work began, the application can
create a fence (initially in an un-triggered state), and tell the
OpenGL renderer to wait until the fence is triggered. When the rest
of the X screen is finished rendering, the fence is triggered, and
OpenGL updates its portion of the screen immediately.
The font system receives several improvements in this release. The
first is that the location of installed X11 fonts can be changed at
configuration time; the example given in the draft release notes moves
them to /usr/share/fonts/X11/, which would put them closer to
other system-installed fonts than the old location,
/usr/X11R6/lib/X11/fonts/. The second change is the
deprecation of some old code. Previous X releases included a bundled
PostScript Type1 font backend; in X11R7.7 this backend is removed and
FreeType is used instead. Support for the now-obsolete CID-keyed font
format has been replaced entirely, as its functionality has been taken
over by the OpenType format.
Under the hood
Primarily for debugging purposes, the X Resource extension now
allows client applications to request more information about other
clients, including their process IDs and the size of other clients'
allocated resources. There are also several new debugging functions
in the X server that can be bound to key sequences — although to
prevent tragic mishaps, they are not bound by default.
XF86LogGrabInfo will write the current set of input grabs to the X log
file, and XF86LogWindowTree will write the current window tree.
XF86Ungrab will release all active input grabs, while XF86ClearGrab
will kill the connections of all active input grabs. These two
potentially-dangerous functions were the source of CVE-2012-0064,
which allowed attackers to bypass password-protected screensavers.
Leaving the functions unbound offers partial protection only, so the
new release also requires users to explicitly turn on support for the
functions in their X Keyboard extension (XKB) configuration file.
Also of potential interest to developers is progress being made on
the X protocol C Bindings (XCB). XCB is intended to one day
completely replace the aging Xlib, which is already accessed primarily
through compatibility layers provided by higher-level toolkits.
Although it remains a work in progress, XCB developers have begun to
add support for the OpenGL X extension (GLX) and XKB.
Several components are now marked as deprecated, specifically the
nested and virtual X servers Xvfb, Xnest, Xephyr, and Xfake. All are
designed to either display their contents inside another X server or
to render content into a virtual framebuffer. The plan is for both
types of functionality to eventually be replaced by substitute video
drivers, xf86-video-nested and xf86-video-dummy. The
functionality will remain unchanged, but with less maintenance
demanded of the project.
Last but by no means least, the project has migrated its
documentation to DocBook. That documentation includes the X protocol
as well as the APIs and ABIs. Previously the documentation existed in
a variety of different formats; the standardization on DocBook not
only unifies it, but thanks to DocBook's XML underpinnings, allows it
to be cross-linked for reference.
Of course, there are always long lists of changes and bugfixes made
to the video drivers, input drivers, and modules that do not bring new
functionality, but still provide a better experience. The project has
a massive combined
change-log document online that provides an entry point into every
fix released during this development cycle. Between that and the new
DocBook documentation, X11 fans have lots of reading to look forward
to.
(
Log in to post comments)