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

libxi: Changes to 'upstream-experimental'



 .gitignore                    |   77 
 COPYING                       |   21 
 Makefile.am                   |   11 
 configure.ac                  |   48 
 doc/.gitignore                |    6 
 doc/Makefile.am               |   66 
 doc/porting.xml               | 1209 +++++
 man/.gitignore                |    2 
 man/Makefile.am               |  246 -
 man/XAllowDeviceEvents.txt    |   56 
 man/XGetDeviceProperty.txt    |    5 
 man/XIQueryDevice.txt         |    6 
 man/XSelectExtensionEvent.txt |    8 
 specs/.gitignore              |    6 
 specs/Makefile.am             |   68 
 specs/encoding.xml            | 2312 +++++++++++
 specs/inputlib.xml            |   70 
 specs/library.xml             | 8559 ++++++++++++++++++++++++++++++++++++++++++
 src/Makefile.am               |    3 
 src/XExtInt.c                 |   72 
 src/XExtToWire.c              |    3 
 src/XGetDCtl.c                |   23 
 src/XGetFCtl.c                |   23 
 src/XGetVers.c                |   24 
 src/XIProperties.c            |    1 
 src/XIQueryVersion.c          |    1 
 src/XISelEv.c                 |   35 
 src/XIint.h                   |    3 
 src/XListDev.c                |    2 
 src/XQueryDv.c                |   24 
 src/XSetBMap.c                |    1 
 31 files changed, 12700 insertions(+), 291 deletions(-)

New commits:
commit ea7e12eaf84ada28f4933e85ecf51a47c9db0b93
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Nov 2 14:26:34 2010 +1000

    libXi 1.4
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/configure.ac b/configure.ac
index 2f773f9..0a4b384 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ dnl Process this file with autoconf to create configure.
 
 AC_PREREQ([2.60])
 
-AC_INIT(libXi, 1.3, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXi)
+AC_INIT(libXi, 1.4.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXi)
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE
 

commit 556246beaffb42e1f58d816542d91e360ea02080
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Nov 2 11:22:01 2010 +1000

    man: XGetDeviceProperty(3) has no parameter 'pending'.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Julien Cristau <jcristau@debian.org>

diff --git a/man/XGetDeviceProperty.txt b/man/XGetDeviceProperty.txt
index b557216..403aa96 100644
--- a/man/XGetDeviceProperty.txt
+++ b/man/XGetDeviceProperty.txt
@@ -19,7 +19,6 @@ SYNOPSIS
                            long offset,
                            long length,
                            Bool delete,
-                           Bool pending,
                            Atom req_type,
                            Atom *actual_type_return,
                            int *actual_format_return,
@@ -96,10 +95,6 @@ SYNOPSIS
           Specifies the offset in the specified property (in
           32-bit quantities) where the data is to be retrieved.
 
-   pending
-          Specifies whether to retrieve the pending state of the
-          property or the current state.
-
    property
           Specifies the property to modify or query.
 

commit ccbebb111fb2084716fce67cb44b5bd8b86adbbc
Author: Jesse Adkins <jesserayadkins@gmail.com>
Date:   Tue Sep 28 13:30:03 2010 -0700

    Purge cvs tags.
    
    Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/src/XIint.h b/src/XIint.h
index 00e84d3..b27f04a 100644
--- a/src/XIint.h
+++ b/src/XIint.h
@@ -1,5 +1,3 @@
-/* $XFree86: xc/lib/Xi/XIint.h,v 3.2 2003/07/07 15:34:22 eich Exp $ */
-
 /*
  *	XIint.h - Header definition and support file for the internal
  *	support routines used by the Xi library.

commit f237427f897d1dc527494653735d4bb93d740546
Author: Carlos Garnacho <carlosg@gnome.org>
Date:   Wed Oct 6 11:04:21 2010 +0200

    Fix typo when converting raw events from the wire.
    
    The raw values were being miscalculated, containing only the integral part
    of the FP3232, meanwhile normal valuators were mistakenly added the fractional
    part of its corresponding raw value.
    
    Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/XExtInt.c b/src/XExtInt.c
index bbd406d..eed6637 100644
--- a/src/XExtInt.c
+++ b/src/XExtInt.c
@@ -1638,7 +1638,7 @@ wireToRawEvent(xXIRawEvent *in, XGenericEventCookie *cookie)
         out->valuators.values[i] = values->integral;
         out->valuators.values[i] += ((double)values->frac / (1 << 16) / (1 << 16));
         out->raw_values[i] = (values + bits)->integral;
-        out->valuators.values[i] += ((double)(values + bits)->frac / (1 << 16) / (1 << 16));
+        out->raw_values[i] += ((double)(values + bits)->frac / (1 << 16) / (1 << 16));
         values++;
     }
 

commit abc26c71b6032683b89085a7ebcd40ca81cdf3f2
Author: Julien Cristau <jcristau@debian.org>
Date:   Sun Oct 3 17:04:57 2010 +0200

    man: fix typo in XIQueryDevice doc
    
    Don't pretend this is XIQueryPointer.
    
    Debian bug#598964
    Reported-by: Joachim Breitner <nomeata@debian.org>
    Signed-off-by: Julien Cristau <jcristau@debian.org>

diff --git a/man/XIQueryDevice.txt b/man/XIQueryDevice.txt
index 9fd0ee7..2b1f76f 100644
--- a/man/XIQueryDevice.txt
+++ b/man/XIQueryDevice.txt
@@ -11,9 +11,9 @@ SYNOPSIS
 
    #include <X11/extensions/XInput2.h>
 
-   XIDeviceInfo* XIQueryPointer( Display *display,
-                                 int deviceid,
-                                 int *ndevices_return);
+   XIDeviceInfo* XIQueryDevice( Display *display,
+                                int deviceid,
+                                int *ndevices_return);
 
    XIFreeDeviceInfo( XIDeviceInfo *info);
 

commit a00926cd16a0b6ddb9f7b074dce88e3fb840831c
Author: Matthieu Herrb <matthieu.herrb@laas.fr>
Date:   Wed Aug 25 22:21:55 2010 +0200

    Fix build with gcc 2.95
    
    Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    Reviewed-by: Matt Turner <mattst88@gmail.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/XISelEv.c b/src/XISelEv.c
index dad890e..f1f3fa4 100644
--- a/src/XISelEv.c
+++ b/src/XISelEv.c
@@ -104,9 +104,9 @@ XIGetSelectedEvents(Display* dpy, Window win, int *num_masks_return)
     xXIEventMask *mask_in = NULL, *mi;
     xXIGetSelectedEventsReq *req;
     xXIGetSelectedEventsReply reply;
+    XExtDisplayInfo *info = XInput_find_display(dpy);
 
     *num_masks_return = -1;
-    XExtDisplayInfo *info = XInput_find_display(dpy);
     LockDisplay(dpy);
     if (_XiCheckExtInit(dpy, Dont_Check, info) == -1)
         goto out;

commit 3f2814a0f9193cb33b44ef53059a4b349cf4cabc
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Aug 2 15:40:32 2010 +1000

    man: improve readability of XAllowDeviceEvents.
    
    Parse the options to event-mode as a list. This requires un-indenting the
    rest, otherwise the asciidoc/xmlto conversion will indent the trailing
    paragraphs more than the list
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/man/XAllowDeviceEvents.txt b/man/XAllowDeviceEvents.txt
index 91d358c..ba7fde3 100644
--- a/man/XAllowDeviceEvents.txt
+++ b/man/XAllowDeviceEvents.txt
@@ -34,16 +34,16 @@ SYNOPSIS
 DESCRIPTION
 -----------
 
-   The XAllowDeviceEvents function releases some queued events if
-   the client has caused a device to freeze. It has no effect if
-   the specified time is earlier than the last-grab time of the
-   most recent active grab for the client and device, or if the
-   specified time is later than the current X server time.
+The XAllowDeviceEvents function releases some queued events if
+the client has caused a device to freeze. It has no effect if
+the specified time is earlier than the last-grab time of the
+most recent active grab for the client and device, or if the
+specified time is later than the current X server time.
 
-   The following describes the processing that occurs depending on
-   what constant you pass to the event_mode argument.
+The following describes the processing that occurs depending on
+what constant you pass to the event_mode argument.
 
-   AsyncThisDevice If the specified device is frozen by the
+   * AsyncThisDevice - If the specified device is frozen by the
    client, event processing for that device continues as usual. If
    the device is frozen multiple times by the client on behalf of
    multiple separate grabs, AsyncThisDevice thaws for
@@ -51,7 +51,7 @@ DESCRIPTION
    not frozen by the client, but the device need not be grabbed by
    the client.
 
-   SyncThisDevice If the specified device is frozen and actively
+   * SyncThisDevice - If the specified device is frozen and actively
    grabbed by the client, event processing for that device
    continues normally until the next key or button event is
    reported to the client. At this time, the specified device
@@ -60,7 +60,7 @@ DESCRIPTION
    SyncThisDevice has no effect if the specified device is not
    frozen by the client or is not grabbed by the client.
 
-   ReplayThisDevice If the specified device is actively grabbed by
+   * ReplayThisDevice - If the specified device is actively grabbed by
    the client and is frozen as the result of an event having been
    sent to the client (either from the activation of a
    GrabDeviceButton or from a previous AllowDeviceEvents with mode
@@ -72,14 +72,14 @@ DESCRIPTION
    not grabbed by the client or if it is not frozen as the result
    of an event.
 
-   AsyncOtherDevices If the remaining devices are frozen by the
+   * AsyncOtherDevices - If the remaining devices are frozen by the
    client, event processing for them continues as usual. If the
    other devices are frozen multiple times by the client on behalf
    of multiple grabs, AsyncOtherDevices "thaws" for all.
    AsyncOtherDevices has no effect if the devices are not frozen
    by the client.
 
-   SyncAll If all devices are frozen by the client, event
+   * SyncAll - If all devices are frozen by the client, event
    processing (for all devices) continues normally until the next
    button or key event is reported to the client for a grabbed
    device, at which time all devices again appear to freeze.
@@ -92,27 +92,27 @@ DESCRIPTION
    subsequent freeze for SyncAll will only freeze each device
    once.
 
-   AsyncAll If all devices are frozen by the client, event
+   * AsyncAll - If all devices are frozen by the client, event
    processing for all devices continues normally. If any device is
    frozen multiple times by the client on behalf of multiple
    separate grabs, AsyncAll thaws for all. AsyncAll has no effect
    unless all devices are frozen by the client.
 
-   AsyncThisDevice, SyncThisDevice, and ReplayThisDevice have no
-   effect on the processing of events from the remaining
-   devices.AsyncOtherDevices has no effect on the processing of
-   events from the specified device. When the event_mode is
-   SyncAll or AsyncAll, the device parameter is ignored.
-
-   It is possible for several grabs of different devices by the
-   same or different clients to be active simultaneously. If a
-   device is frozen on behalf of any grab, no event processing is
-   performed for the device. It is possible for a single device to
-   be frozen because of several grabs. In this case, the freeze
-   must be released on behalf of each grab before events can again
-   be processed.
-
-   XAllowDeviceEvents can generate a BadDevice or BadValue error.
+AsyncThisDevice, SyncThisDevice, and ReplayThisDevice have no
+effect on the processing of events from the remaining
+devices.AsyncOtherDevices has no effect on the processing of
+events from the specified device. When the event_mode is
+SyncAll or AsyncAll, the device parameter is ignored.
+
+It is possible for several grabs of different devices by the
+same or different clients to be active simultaneously. If a
+device is frozen on behalf of any grab, no event processing is
+performed for the device. It is possible for a single device to
+be frozen because of several grabs. In this case, the freeze
+must be released on behalf of each grab before events can again
+be processed.
+
+XAllowDeviceEvents can generate a BadDevice or BadValue error.
 
 DIAGNOSTICS
 -------------

commit d3eb99478ca96fdfc4ceb2a9809f19f803bba6c7
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Sun Aug 15 18:05:13 2010 -0400

    man: add $(AM_V_GEN) for silent rules where missing
    
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

diff --git a/man/Makefile.am b/man/Makefile.am
index 3c2fd08..c8db111 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -163,16 +163,16 @@ SUFFIXES = .man .$(LIB_MAN_SUFFIX)
 if HAVE_DOCTOOLS
 SUFFIXES += .txt .xml
 .txt.xml:
-	$(ASCIIDOC) -b docbook -d manpage -o $@ $<
+	$(AM_V_GEN)$(ASCIIDOC) -b docbook -d manpage -o $@ $<
 .xml.man:
-	$(XMLTO) man $<
-	mv -f $(@:.man=.libmansuffix) $@
+	$(AM_V_GEN)$(XMLTO) man $<
+	$(AM_V_GEN)mv -f $(@:.man=.libmansuffix) $@
 
 # Invoke asciidoc/xmlto main man page generation for shadow pages
 $(libman_shadows):
 	@if test ! -f $(@:.man=.libmansuffix); then \
-	  rm -f $<; \
-	  $(MAKE) $(AM_MAKEFLAGS) $< || exit 1; \
+	  $(AM_V_GEN)rm -f $<; \
+	  $(AM_V_GEN)$(MAKE) $(AM_MAKEFLAGS) $< || exit 1; \
 	fi
-	mv -f $(@:.man=.libmansuffix) $@
+	$(AM_V_GEN)mv -f $(@:.man=.libmansuffix) $@
 endif

commit dbcca7e1296ae671964c55be13bfbb9113a600a0
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Sun Aug 15 17:46:52 2010 -0400

    man: whitespace management
    
    This style should make it easier to read filenames
    in a large list.
    
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

diff --git a/man/Makefile.am b/man/Makefile.am
index 4577d82..3c2fd08 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -24,50 +24,50 @@
 libmandir = $(LIB_MAN_DIR)
 
 # Source files for X Input v2 man pages
-XI2_txt = \
-	XIChangeHierarchy.txt \
-	XIDefineCursor.txt \
-	XIGrabButton.txt \
-	XIGrabDevice.txt \
-        XIGrabEnter.txt \
-	XIQueryDevice.txt \
-	XIQueryPointer.txt \
-	XIQueryVersion.txt \
-	XISelectEvents.txt \
-	XISetClientPointer.txt \
-	XISetFocus.txt \
-	XIWarpPointer.txt \
-	XIListProperties.txt \
+XI2_txt = 					\
+	XIChangeHierarchy.txt			\
+	XIDefineCursor.txt			\
+	XIGrabButton.txt			\
+	XIGrabDevice.txt			\
+	XIGrabEnter.txt				\
+	XIQueryDevice.txt			\
+	XIQueryPointer.txt			\
+	XIQueryVersion.txt			\
+	XISelectEvents.txt			\
+	XISetClientPointer.txt			\
+	XISetFocus.txt				\
+	XIWarpPointer.txt			\
+	XIListProperties.txt			\
 	XIChangeProperty.txt
 
 # Source files for X Input v1 man pages
 libman_txt = \
-	XAllowDeviceEvents.txt \
-	XChangeDeviceDontPropagateList.txt \
-	XChangeKeyboardDevice.txt \
-	XChangePointerDevice.txt \
-	XDeviceBell.txt \
-	XGetDeviceControl.txt \
-	XGetDeviceKeyMapping.txt \
-	XGetDeviceModifierMapping.txt \
-	XGetDeviceMotionEvents.txt \
-	XGetDeviceProperty.txt \
-	XGetExtensionVersion.txt \
-	XGetFeedbackControl.txt \
-	XGrabDeviceButton.txt \
-	XGrabDeviceKey.txt \
-	XGrabDevice.txt \
-	XListDeviceProperties.txt \
-	XListInputDevices.txt \
-	XOpenDevice.txt \
-	XQueryDeviceState.txt \
-	XSelectExtensionEvent.txt \
-	XSendExtensionEvent.txt \
-	XSetDeviceButtonMapping.txt \
-	XSetDeviceFocus.txt \
-	XSetDeviceMode.txt \
-	XSetDeviceValuators.txt \
-        $(XI2_txt)
+	XAllowDeviceEvents.txt			\
+	XChangeDeviceDontPropagateList.txt	\
+	XChangeKeyboardDevice.txt		\
+	XChangePointerDevice.txt		\
+	XDeviceBell.txt				\
+	XGetDeviceControl.txt			\
+	XGetDeviceKeyMapping.txt		\
+	XGetDeviceModifierMapping.txt		\
+	XGetDeviceMotionEvents.txt		\
+	XGetDeviceProperty.txt			\
+	XGetExtensionVersion.txt		\
+	XGetFeedbackControl.txt			\
+	XGrabDeviceButton.txt			\
+	XGrabDeviceKey.txt			\
+	XGrabDevice.txt				\
+	XListDeviceProperties.txt		\
+	XListInputDevices.txt			\
+	XOpenDevice.txt				\
+	XQueryDeviceState.txt			\
+	XSelectExtensionEvent.txt		\
+	XSendExtensionEvent.txt			\
+	XSetDeviceButtonMapping.txt		\
+	XSetDeviceFocus.txt			\
+	XSetDeviceMode.txt			\
+	XSetDeviceValuators.txt			\
+	$(XI2_txt)
 
 # Name of DocBook XML files generated from .txt files by asciidoc
 libman_xml = $(libman_txt:.txt=.xml)
@@ -75,40 +75,40 @@ libman_xml = $(libman_txt:.txt=.xml)
 # Shadow man pages are simply links to a main man page.
 # They are created by the xmlto command when generating man pages from DocBook
 # The shadow man page contains a gtroff .so request to include the main man page
-XI2_shadows = \
-	XIUndefineCursor.man \
-	XIUngrabButton.man \
-	XIGrabKeycode.man \
-	XIUngrabKeycode.man \
-	XIUngrabDevice.man  \
-        XIUngrabEnter.man \
-        XIGrabFocusIn.man \
-        XIUngrabFocusIn.man \
-	XIGetClientPointer.man \
-	XIGetFocus.man \
-	XIGetSelectedEvents.man \
-	XIDeleteProperty.man \
-	XIGetProperty.man \
+XI2_shadows = 					\
+	XIUndefineCursor.man			\
+	XIUngrabButton.man			\
+	XIGrabKeycode.man			\
+	XIUngrabKeycode.man			\
+	XIUngrabDevice.man			\
+	XIUngrabEnter.man			\
+	XIGrabFocusIn.man			\
+	XIUngrabFocusIn.man			\
+	XIGetClientPointer.man			\
+	XIGetFocus.man				\
+	XIGetSelectedEvents.man			\
+	XIDeleteProperty.man			\
+	XIGetProperty.man			\
 	XIFreeDeviceInfo.man
 
-libman_shadows = \
-	XGetDeviceDontPropagateList.man \
-	XChangeDeviceControl.man \
-	XChangeDeviceKeyMapping.man \
-	XSetDeviceModifierMapping.man \
-	XChangeFeedbackControl.man \
-	XUngrabDeviceButton.man \
-	XUngrabDeviceKey.man \
-	XUngrabDevice.man \
-	XDeviceTimeCoord.man \
-	XFreeDeviceList.man \
-	XCloseDevice.man \
-	XGetSelectedExtensionEvents.man \
-	XGetDeviceButtonMapping.man \
-	XGetDeviceFocus.man \
-	XChangeDeviceProperty.man \
-	XDeleteDeviceProperty.man \
-        $(XI2_shadows)
+libman_shadows =				\
+	XGetDeviceDontPropagateList.man		\
+	XChangeDeviceControl.man		\
+	XChangeDeviceKeyMapping.man		\
+	XSetDeviceModifierMapping.man		\
+	XChangeFeedbackControl.man		\
+	XUngrabDeviceButton.man			\
+	XUngrabDeviceKey.man			\
+	XUngrabDevice.man			\
+	XDeviceTimeCoord.man			\
+	XFreeDeviceList.man			\
+	XCloseDevice.man			\
+	XGetSelectedExtensionEvents.man		\
+	XGetDeviceButtonMapping.man		\
+	XGetDeviceFocus.man			\
+	XChangeDeviceProperty.man		\
+	XDeleteDeviceProperty.man		\
+	$(XI2_shadows)
 
 # Name of man page files generated from DocBook XML files by xmlto
 libman_PRE = $(libman_txt:.txt=.man) $(libman_shadows)

commit bc9f68de51ec7d3d88330ff843eccd6cbf9a93ad
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Sun Aug 15 12:53:04 2010 -0400

    man: Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
    
    The value of MAN_SUBST is the same for all X.Org packages.
    Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS
    
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

diff --git a/man/Makefile.am b/man/Makefile.am
index edfc506..4577d82 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -110,7 +110,6 @@ libman_shadows = \
 	XDeleteDeviceProperty.man \
         $(XI2_shadows)
 
-
 # Name of man page files generated from DocBook XML files by xmlto
 libman_PRE = $(libman_txt:.txt=.man) $(libman_shadows)
 
@@ -152,22 +151,13 @@ XIUngrabEnter.man XIGrabFocusIn.man XIUngrabFocusIn.man: XIGrabEnter.man
 XIGetSelectedEvents.man: XISelectEvents.man
 XIFreeDeviceInfo.man: XIQueryDevice.man
 
-# Strings to replace in man pages
-XORGRELSTRING = $(PACKAGE_STRING)
-  XORGMANNAME = X Version 11
-
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
 # Unable to use __libmansuffix__ as underscores are lost in txt --> xml conversion
-MAN_SUBSTS = \
-	-e 's/__xorgversion__/"$(XORGRELSTRING)" "$(XORGMANNAME)"/' \
-	-e 's/__xservername__/Xorg/g' \
-	-e 's/__xconfigfile__/xorg.conf/g' \
-	-e 's/__appmansuffix__/$(APP_MAN_SUFFIX)/g' \
-	-e 's/libmansuffix/$(LIB_MAN_SUFFIX)/g' \
-	-e 's/__filemansuffix__/$(FILE_MAN_SUFFIX)/g'
+MAN_SUBSTS += -e 's/libmansuffix/$(LIB_MAN_SUFFIX)/g'
 
 SUFFIXES = .man .$(LIB_MAN_SUFFIX)
 .man.$(LIB_MAN_SUFFIX):
-	$(SED) $(MAN_SUBSTS) < $< > $@
+	$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
 
 # Generate man pages and shadow pages from .txt and then from DocBook XML
 if HAVE_DOCTOOLS

commit 20b843c820dd147a0f8f7e6d06da7a0c18d40f1c
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Sun Aug 15 09:33:17 2010 -0400

    man: add/change comments regarding the 3 step conversion from text source
    
    In the hope of making it easier to learn.
    This makefile may serve as a reference.
    
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

diff --git a/man/Makefile.am b/man/Makefile.am
index b07da27..edfc506 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -23,6 +23,7 @@
 
 libmandir = $(LIB_MAN_DIR)
 
+# Source files for X Input v2 man pages
 XI2_txt = \
 	XIChangeHierarchy.txt \
 	XIDefineCursor.txt \
@@ -39,6 +40,7 @@ XI2_txt = \
 	XIListProperties.txt \
 	XIChangeProperty.txt
 
+# Source files for X Input v1 man pages
 libman_txt = \
 	XAllowDeviceEvents.txt \
 	XChangeDeviceDontPropagateList.txt \
@@ -67,10 +69,12 @@ libman_txt = \
 	XSetDeviceValuators.txt \
         $(XI2_txt)
 
+# Name of DocBook XML files generated from .txt files by asciidoc
 libman_xml = $(libman_txt:.txt=.xml)
-# manpages that are references to another page. These are produced as a
-# side effect of the xmlto rule, so they need to be handled specially.
 
+# Shadow man pages are simply links to a main man page.
+# They are created by the xmlto command when generating man pages from DocBook
+# The shadow man page contains a gtroff .so request to include the main man page
 XI2_shadows = \
 	XIUndefineCursor.man \
 	XIUngrabButton.man \
@@ -107,6 +111,7 @@ libman_shadows = \
         $(XI2_shadows)
 
 
+# Name of man page files generated from DocBook XML files by xmlto
 libman_PRE = $(libman_txt:.txt=.man) $(libman_shadows)
 
 if INSTALL_MANPAGES
@@ -117,7 +122,7 @@ EXTRA_DIST = $(libman_txt) $(libman_PRE)
 CLEANFILES = $(libman_DATA) *.libmansuffix
 MAINTAINERCLEANFILES = $(libman_PRE) *.xml
 
-# prerequisites for the side effect pages
+# Dependencies for X Input v1 shadow pages
 XGetDeviceDontPropagateList.man: XChangeDeviceDontPropagateList.man
 XChangeDeviceControl.man: XGetDeviceControl.man
 XChangeDeviceKeyMapping.man: XGetDeviceKeyMapping.man
@@ -135,7 +140,7 @@ XGetDeviceFocus.man: XSetDeviceFocus.man
 XChangeDeviceProperty.man: XGetDeviceProperty.man
 XDeleteDeviceProperty.man: XGetDeviceProperty.man
 
-# XI2 prereqs
+# Dependencies for X Input v2 shadow pages
 XIUndefineCursor.man: XIDefineCursor.man
 XIUngrabButton.man XIGrabKeycode.man XIUngrabKeycode.man: XIGrabButton.man
 XIGetClientPointer.man: XISetClientPointer.man
@@ -151,6 +156,7 @@ XIFreeDeviceInfo.man: XIQueryDevice.man
 XORGRELSTRING = $(PACKAGE_STRING)
   XORGMANNAME = X Version 11
 
+# Unable to use __libmansuffix__ as underscores are lost in txt --> xml conversion
 MAN_SUBSTS = \
 	-e 's/__xorgversion__/"$(XORGRELSTRING)" "$(XORGMANNAME)"/' \
 	-e 's/__xservername__/Xorg/g' \
@@ -163,6 +169,7 @@ SUFFIXES = .man .$(LIB_MAN_SUFFIX)
 .man.$(LIB_MAN_SUFFIX):
 	$(SED) $(MAN_SUBSTS) < $< > $@
 
+# Generate man pages and shadow pages from .txt and then from DocBook XML
 if HAVE_DOCTOOLS
 SUFFIXES += .txt .xml
 .txt.xml:
@@ -171,7 +178,7 @@ SUFFIXES += .txt .xml
 	$(XMLTO) man $<
 	mv -f $(@:.man=.libmansuffix) $@
 
-# need to force asciidoc/xmlto to run if necessary for side effect pages
+# Invoke asciidoc/xmlto main man page generation for shadow pages
 $(libman_shadows):
 	@if test ! -f $(@:.man=.libmansuffix); then \
 	  rm -f $<; \

commit e7b4e33a3ea1a3cce074da2d91bda7258e01652a
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Sun Aug 15 07:54:39 2010 -0400

    man: rename libman_pre to libman_PRE
    
    To be consistent with all other man pages makefiles.
    
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

diff --git a/man/Makefile.am b/man/Makefile.am
index e9426ab..b07da27 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -107,15 +107,15 @@ libman_shadows = \
         $(XI2_shadows)
 
 
-libman_pre = $(libman_txt:.txt=.man) $(libman_shadows)
+libman_PRE = $(libman_txt:.txt=.man) $(libman_shadows)
 
 if INSTALL_MANPAGES
-libman_DATA = $(libman_pre:.man=.$(LIB_MAN_SUFFIX))
+libman_DATA = $(libman_PRE:.man=.$(LIB_MAN_SUFFIX))
 endif
 
-EXTRA_DIST = $(libman_txt) $(libman_pre)
+EXTRA_DIST = $(libman_txt) $(libman_PRE)
 CLEANFILES = $(libman_DATA) *.libmansuffix
-MAINTAINERCLEANFILES = $(libman_pre) *.xml
+MAINTAINERCLEANFILES = $(libman_PRE) *.xml
 
 # prerequisites for the side effect pages
 XGetDeviceDontPropagateList.man: XChangeDeviceDontPropagateList.man

commit d854293a63be4a983e3e8fe8a1110a5ea1ffba2a
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Sun Aug 15 07:32:10 2010 -0400

    man: use "shadows" terminology in variable names.
    
    For man pages that are just links to a main man page.
    This is how they are referred to in all other librairies.
    
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

diff --git a/man/Makefile.am b/man/Makefile.am
index a71b4f3..e9426ab 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -23,7 +23,7 @@
 
 libmandir = $(LIB_MAN_DIR)
 
-XI2_manpages = \
+XI2_txt = \
 	XIChangeHierarchy.txt \
 	XIDefineCursor.txt \
 	XIGrabButton.txt \
@@ -65,13 +65,13 @@ libman_txt = \
 	XSetDeviceFocus.txt \
 	XSetDeviceMode.txt \
 	XSetDeviceValuators.txt \
-        $(XI2_manpages)
+        $(XI2_txt)
 
 libman_xml = $(libman_txt:.txt=.xml)
 # manpages that are references to another page. These are produced as a
 # side effect of the xmlto rule, so they need to be handled specially.
 
-XI2_refpages = \
+XI2_shadows = \
 	XIUndefineCursor.man \
 	XIUngrabButton.man \
 	XIGrabKeycode.man \
@@ -87,7 +87,7 @@ XI2_refpages = \
 	XIGetProperty.man \
 	XIFreeDeviceInfo.man
 
-libman_ref = \
+libman_shadows = \
 	XGetDeviceDontPropagateList.man \
 	XChangeDeviceControl.man \
 	XChangeDeviceKeyMapping.man \
@@ -104,10 +104,10 @@ libman_ref = \
 	XGetDeviceFocus.man \
 	XChangeDeviceProperty.man \
 	XDeleteDeviceProperty.man \
-        $(XI2_refpages)
+        $(XI2_shadows)
 
 
-libman_pre = $(libman_txt:.txt=.man) $(libman_ref)
+libman_pre = $(libman_txt:.txt=.man) $(libman_shadows)
 
 if INSTALL_MANPAGES
 libman_DATA = $(libman_pre:.man=.$(LIB_MAN_SUFFIX))
@@ -172,7 +172,7 @@ SUFFIXES += .txt .xml
 	mv -f $(@:.man=.libmansuffix) $@
 
 # need to force asciidoc/xmlto to run if necessary for side effect pages
-$(libman_ref):
+$(libman_shadows):
 	@if test ! -f $(@:.man=.libmansuffix); then \
 	  rm -f $<; \
 	  $(MAKE) $(AM_MAKEFLAGS) $< || exit 1; \

commit 9fe6bfec833a66a3a8ca70b8769eada91a320bf7
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Sat Aug 14 21:41:51 2010 -0400

    man: remove used LIB_MAN_DIR_SUFFIX (part of an unrequired broken fix)
    
    Local fix in CVS for bug 5628 is not required
    as the problem has been fixed in
    util-macros d9062e4077ebfd0985baf8418f3d0f111b9ddbba
    
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

diff --git a/man/Makefile.am b/man/Makefile.am
index 224143e..a71b4f3 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -23,8 +23,6 @@
 
 libmandir = $(LIB_MAN_DIR)
 
-LIB_MAN_DIR_SUFFIX = $(LIB_MAN_DIR:@mandir@/man%=%)
-
 XI2_manpages = \
 	XIChangeHierarchy.txt \
 	XIDefineCursor.txt \

commit 8daf961d0fe6a1433c8248d984618a7e22ff88b8
Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
Date:   Fri Jun 18 11:32:36 2010 +0300

    Always unlock display correctly
    
    XISelectEvents and XIGetSelectedEvents were not unlocking display in all
    return paths.
    
    Reported-by: Julien Cristau <jcristau@debian.org>
    Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>

diff --git a/src/XISelEv.c b/src/XISelEv.c
index 3c1f018..dad890e 100644
--- a/src/XISelEv.c
+++ b/src/XISelEv.c
@@ -48,11 +48,14 @@ XISelectEvents(Display* dpy, Window win, XIEventMask* masks, int num_masks)
     xXIEventMask mask;
     int i;
     int len = 0;
+    int r = Success;
 
     XExtDisplayInfo *info = XInput_find_display(dpy);
     LockDisplay(dpy);
-    if (_XiCheckExtInit(dpy, Dont_Check, info) == -1)
-	return (NoSuchExtension);
+    if (_XiCheckExtInit(dpy, Dont_Check, info) == -1) {
+        r = NoSuchExtension;
+        goto out;
+    }
     GetReq(XISelectEvents, req);
 
     req->reqType = info->codes->major_opcode;
@@ -85,9 +88,10 @@ XISelectEvents(Display* dpy, Window win, XIEventMask* masks, int num_masks)
         free(buff);
     }
 
+out:
     UnlockDisplay(dpy);
     SyncHandle();
-    return Success;
+    return r;
 
 }
 
@@ -101,13 +105,11 @@ XIGetSelectedEvents(Display* dpy, Window win, int *num_masks_return)
     xXIGetSelectedEventsReq *req;
     xXIGetSelectedEventsReply reply;
 
+    *num_masks_return = -1;
     XExtDisplayInfo *info = XInput_find_display(dpy);
     LockDisplay(dpy);
     if (_XiCheckExtInit(dpy, Dont_Check, info) == -1)
-    {
-        *num_masks_return = -1;
-	return NULL;
-    }
+        goto out;
 
     GetReq(XIGetSelectedEvents, req);
 
@@ -116,17 +118,17 @@ XIGetSelectedEvents(Display* dpy, Window win, int *num_masks_return)
     req->win = win;
 
     if (!_XReply(dpy, (xReply *) &reply, 0, xFalse))
-        goto error;
+        goto out;
 
     if (reply.num_masks == 0)
     {
         *num_masks_return = 0;
-        return NULL;
+        goto out;
     }
 
     mask_in = Xmalloc(reply.length * 4);
     if (!mask_in)
-        goto error;
+        goto out;
 
     _XRead(dpy, (char*)mask_in, reply.length * 4);
 
@@ -144,7 +146,7 @@ XIGetSelectedEvents(Display* dpy, Window win, int *num_masks_return)
 
     mask_out = Xmalloc(len);
     if (!mask_out)
-        goto error;
+        goto out;
 
     mi = mask_in;
     mask = (unsigned char*)&mask_out[reply.num_masks];
@@ -161,16 +163,11 @@ XIGetSelectedEvents(Display* dpy, Window win, int *num_masks_return)
 
     *num_masks_return = reply.num_masks;
 
+out:
     Xfree(mask_in);
 
-    return mask_out;
-
-error:
-    if (mask_in)
-        Xfree(mask_in);
-    *num_masks_return = -1;
     UnlockDisplay(dpy);
     SyncHandle();
-    return NULL;
 
+    return mask_out;
 }

commit 3a6839b4a229aa59188025c9b285023110a20aad
Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
Date:   Mon Jun 14 10:37:56 2010 +0300

    Use single error path in XGetDeviceControl
    
    This reduces code duplication and fixes possible leak of d. d would leak if
    allocation of Device fails.
    
    Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
    Reviewed-by: Julien Cristau <jcristau@debian.org>

diff --git a/src/XGetDCtl.c b/src/XGetDCtl.c
index 8f76a51..729b0a0 100644
--- a/src/XGetDCtl.c
+++ b/src/XGetDCtl.c
@@ -84,19 +84,15 @@ XGetDeviceControl(
     req->deviceid = dev->device_id;
     req->control = control;
 
-    if (!_XReply(dpy, (xReply *) & rep, 0, xFalse)) {
-	UnlockDisplay(dpy);
-	SyncHandle();
-	return (XDeviceControl *) NULL;
-    }
+    if (!_XReply(dpy, (xReply *) & rep, 0, xFalse))
+	goto out;
+
     if (rep.length > 0) {
 	nbytes = (long)rep.length << 2;
 	d = (xDeviceState *) Xmalloc((unsigned)nbytes);
 	if (!d) {
 	    _XEatData(dpy, (unsigned long)nbytes);
-	    UnlockDisplay(dpy);
-	    SyncHandle();
-	    return (XDeviceControl *) NULL;
+	    goto out;
 	}
 	sav = d;
 	_XRead(dpy, (char *)d, nbytes);
@@ -138,11 +134,9 @@ XGetDeviceControl(
 	}
 
 	Device = (XDeviceControl *) Xmalloc((unsigned)size);
-	if (!Device) {
-	    UnlockDisplay(dpy);
-	    SyncHandle();
-	    return (XDeviceControl *) NULL;
-	}
+	if (!Device)
+	    goto out;
+
 	Sav = Device;
 
 	d = sav;
@@ -228,8 +222,9 @@ XGetDeviceControl(
 	default:
 	    break;
 	}
-	XFree(sav);
     }
+out:
+    XFree(sav);
 
     UnlockDisplay(dpy);
     SyncHandle();

commit 850288fee663c07fbd491859629543f78bbadd3c
Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
Date:   Mon Jun 14 10:37:56 2010 +0300


Reply to: