XI2 branch ready for review (xi2-for-master)



Hello fellow hackers,

I've just pushed the xi2-for-master branch [1], which is basically the
xi2 branch modulo multidevice events and GtkDeviceGroup. These have been
left out at the moment until Xorg developers make up their minds wrt
multitouch handling [2].

For those needing an introduction, this branch enables GTK+ to use
XInput2 for input devices, XInput2 is meant to replace both XInput1 and
core events, and also enables the use of multiple keyboard and pointer
pairs (also known as MPX), so the most visible changes to application
developers are:

* There is new API for everything that would cause uncertainty on which
device to choose, pointer querying, warping, grabs, ...

* Now all GdkEvents coming from an input device will have an associated
GdkDevice. There is also a GdkDevice for keyboards

* gdk_devices_list() has been deprecated in favor of GdkDeviceManager,
which also provides signals for devices being added/removed/...

* event masks can be per-device. older gdk_window_set_events() & co act
on all devices that are visible in the screen (master devices).

All of this is at the moment only enabled if gdk_enable_multidevice() is
called prior to gdk_display_open/gtk_init, although it could be worth
considering changing the default here, as only applications mixing X and
Gdk calls are in trouble here (metacity, emacs). If that function is not
called, Gdk will resort to Core (And maybe XI1) events.

Both quartz and win32 compile and work as in master, no multitouch in
these yet...

So, reviewing and comments are most welcome :)

Cheers,
  Carlos

[1] http://git.gnome.org/browse/gtk+/?h=xi2-for-master
[2] http://lists.x.org/archives/xorg-devel/2010-March/006206.html



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]