summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-06-02Add XIGrabButtonWithConfine and XIGrabEnterWithConfine with XI 2.1inputproto-2.1-develPeter Hutterer5-8/+124
Same as the XI 2.0 calls but they take a confine_to window. Both the old call and the new call send the confine_to down the wire now (None for XIGrabButton/XIGrabEnter). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-06-02Added XIGrabDeviceWithConfine.Philipp Reh4-7/+72
The new function is like XIGrabDevice but it takes an additional confine_to parameter. This functionality is important for programs that need relative mouse movement but also need the cursor to stay in their window (like games, for example). The confine_to value is put after the variable length mask, so the protocol doesn't need a completely new request. To make this possible, it is first checked if the server supports version 2.1 or greater, in which case it will expect the new parameter. Otherwise the new WithConfine is unsupported. Signed-off-by: Philipp Reh <sefi@s-e-f-i.de> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-06-02Support XI 2.1 internallyPeter Hutterer2-2/+4
Add the required constants to pretend to support XI 2.1. Having named constants for 2.1 seems a bit pointless, so let's just use the numbers directly. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-06-02Add XI2 library-internal array offsets to XIint.hPeter Hutterer1-0/+15
These defines are currently defined in XI.h and XI2.h. Their only use is as offset into a library-internal array. Move them to XIint.h so they may be removed from the protocol headers with the next revision. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-06-02Use Data, not Data32 in XIPassiveGrabDevicePeter Hutterer1-2/+2
Data32 takes and iterates over an array of longs, thus skipping every 4 bytes on LP64. Here we only have arrays of ints, use the normal Data macro instead. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-06-02man: fix missing comma in XIGrabEnter man pagePeter Hutterer1-1/+1
2011-05-19Silence compiler warning due to differnent event conversion procsPeter Hutterer2-4/+11
XExtInt.c:161:5: warning: initialization from incompatible pointer type XSndExEv.c: In function 'XSendExtensionEvent': XSndExEv.c:84:8: warning: assignment from incompatible pointer type Xlib and libXi differ in the conversion functions. libXi takes an xEvent** and a num_events parameter since it may split an event into multiple xEvents. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-05-19Silence compiler warning in XListDProp.cPeter Hutterer1-1/+1
XListDProp.c: In function 'XListDeviceProperties': XListDProp.c:72:9: warning: pointer targets in passing argument 2 of '_XRead32' differ in signedness /usr/include/X11/Xlibint.h:652:13: note: expected 'long int *' but argument is of type 'Atom *' Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-05-19man: fix typo, layout in XGetExtensionVersion.manPeter Hutterer1-5/+6
Fix a typo and move from MPX to XI2. Add a linebreak to make the depreciation separate from the function description. Changes in the second paragraph are just realignment due to the linebreak. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-05-08Move Xinput server API documentation from libXi to xserverAlan Coopersmith5-1231/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2011-05-05Remove a few unused assignments.Peter Hutterer1-3/+0
Found by static analyzer. Reported-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-05XIChangeHierarchy: Return Success early if no actual changes are requested.Peter Hutterer2-1/+5
Do the same for negative num_changes. Found by static analyzer. Reported-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-05Allocate enough memory for raw events + extra data.Peter Hutterer1-1/+1
Necessary space was calculated, but not actually used to allocate memory. As a result, valuator data would overwrite the allocated memory. ==4166== Invalid write of size 1 ==4166== at 0x4C29F04: memcpy (mc_replace_strmem.c:497) ==4166== by 0x8F39180: ??? (in /usr/lib/libXi.so.6.1.0) ==4166== by 0x7433D48: _XCopyEventCookie (in /usr/lib/libX11.so.6.3.0) ==4166== by 0x7425166: XPeekEvent (in /usr/lib/libX11.so.6.3.0) ==4166== by 0x49C3E3: process_key (x11_be.c:1065) ==4166== by 0x49EA5C: event_key_release (x11_be.c:2201) ==4166== by 0x49DD6E: x11_be_process_events (x11_be.c:1892) ==4166== by 0x4A38F4: x11_be_main_loop (x11_be.c:4353) ==4166== by 0x4A39E1: x11_be_thread_main (x11_be.c:4385) ==4166== by 0x87549C9: start_thread (pthread_create.c:300) ==4166== by 0x8A516FC: clone (clone.S:112) ==4166== Address 0x168afe80 is 0 bytes after a block of size 96 alloc'd ==4166== at 0x4C284A8: malloc (vg_replace_malloc.c:236) ==4166== by 0x8F390BD: ??? (in /usr/lib/libXi.so.6.1.0) ==4166== by 0x7433D48: _XCopyEventCookie (in /usr/lib/libX11.so.6.3.0) ==4166== by 0x7425166: XPeekEvent (in /usr/lib/libX11.so.6.3.0) ==4166== by 0x49C3E3: process_key (x11_be.c:1065) ==4166== by 0x49EA5C: event_key_release (x11_be.c:2201) ==4166== by 0x49DD6E: x11_be_process_events (x11_be.c:1892) ==4166== by 0x4A38F4: x11_be_main_loop (x11_be.c:4353) ==4166== by 0x4A39E1: x11_be_thread_main (x11_be.c:4385) ==4166== by 0x87549C9: start_thread (pthread_create.c:300) Reported-by: Roger Cruz <roger.cruz@virtualcomputer.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-05-03Fix XISelectEvents on 64 bits, strict alignement architectures.Matthieu Herrb1-1/+1
Use Data() to send the struct xXIEventMask on the wire instead of Data32() which expects a pointer to a 64bits value on LP64 architectures. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-03-30Documentation: add Docbook external references supportGaetan Nadon6-116/+120
When writing technical documentation, it is often necessary to cross reference to other information. When that other information is not in the current document, additional support is needed, namely <olink>. A new feature with version 1.7 of xorg-sgml-doctools adds references to other documents within or outside this package. This patch adds technical support for this feature but does not change the content of the documentation as seen by the end user. Each book or article must generate a database containing the href of sections that can be referred to from another document. This database is installed in DATAROOTDIR/sgml/X11/dbs. There is a requirement that the value of DATAROOTDIR for xorg-sgml-doctools and for the package documentation is the same. This forms a virtual document tree. This database is consulted by other documents while they are being generated in order to fulfill the missing information for linking. Refer to the xorg-sgml-doctools for further technical information. Co-authored-by: Matt Dew <marcoz@osource.org> Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-03-18configure.ac: 1.4.2Jeremy Huddleston1-1/+1
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-03-17Force alignment with sizeof(Atom) for XIButtonClassInfoPeter Hutterer1-4/+14
The memory layout of an XIButtonClassInfo is [struct XIButtonClassInfo][mask][labels] With the mask being currently 4-byte aligned and labels a list of Atoms. On LP64, Atoms are 8 byte, leading to unaligned access for some mask lengths. Force the alignment to be sizeof(Atom). Reported-by: Christian Weisgerber <naddy@mips.inka.de> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Christian Weisgerber <naddy@mips.inka.de> Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-03-08Don't discard extra data for passive grabs.Peter Hutterer1-1/+1
Failed modifier data was discarded, causing assertions inside xcb. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-03-08man: describe return value for XI2 passive grabbing calls.Peter Hutterer2-0/+12
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-03-03Rename XSetCPtr.c to XISetCPtr.c.Peter Hutterer2-2/+2
XISetClientPointer is an XI2.0 call and should be named accordingly. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-03-03Require XI 2 for all XI 2 calls.Peter Hutterer13-19/+19
Each XI2 call should check _XiCheckExtInit for XI version 2.0 or higher. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-02-23Fix typo in comment.Peter Hutterer1-1/+1
Reported-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-02-23Fix invalid read in XIGrabDevice.Peter Hutterer1-2/+2
Miscalculation of length caused Data() to memcpy too many bytes. ==2865== Invalid read of size 1 ==2865== at 0x4A07480: memcpy (mc_replace_strmem.c:602) ==2865== by 0x544271E: XIGrabDevice (XIGrabDevice.c:69) ==2865== by 0x400B0A: main (gnome642481.c:56) ==2865== Address 0x642f614 is 0 bytes after a block of size 20 alloc'd ==2865== at 0x4A04896: calloc (vg_replace_malloc.c:418) ==2865== by 0x54425D3: XIGrabDevice (XIGrabDevice.c:65) ==2865== by 0x400B0A: main (gnome642481.c:56) SetReqLen() expects 4-byte units. Data() expects bytes. Gnome Bug 642481 <https://bugzilla.gnome.org/show_bug.cgi?id=642481> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-02-23Mark sourceid in Raw events as bug and force to 0..Peter Hutterer2-1/+2
The protocol does not provide a source ID for raw events, so this value is always 0. It shouldn't really be there, but the past is so hard to change. Reported-by: Mark Dokter <dokter@icg.tugraz.at> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-02-23man: note that callers of XIQueryPointer must free the button mask.Peter Hutterer1-0/+3
buttons_return->mask is allocated by the library and must be freed by the caller to avoid leaking. Reported-by: Matthias Clasen <mclasen@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-02-02config: comment, minor upgrade, quote and layout configure.acGaetan Nadon1-16/+18
Group statements per section as per Autoconf standard layout Quote statements where appropriate. Autoconf recommends not using dnl instead of # for comments Use AC_CONFIG_FILES to replace the deprecated AC_OUTPUT with parameters. Use AC_PROG_LIBTOOL to replace the deprecated AM_PROG_LIBTOOL Remove redundant AC_SUBST(*_CFLAGS) and/or *_LIBS Remove redundant AC_PROG_MAKE_SET included with AM_INIT_AUTOMAKE Remove redundant AC_CANONICAL_HOST included in XORG_DEFAULT_OPTIONS Add AC_CONFIG_SRCDIR([Makefile.am]) where missing Update minimum version of util-macros to at least 1.8. One or more of the above actions were applied No functional configuration changes This helps automated maintenance and release activities. Details can be found in http://wiki.x.org/wiki/NewModuleGuidelines Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-01-28config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERSGaetan Nadon1-1/+1
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-01-28config: remove already included AC_PROG_SED statementGaetan Nadon1-1/+0
Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS Use the appropriate platform version of sed Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-01-27config: remove AC_PROG_CC as it overrides AC_PROG_C_C99Gaetan Nadon1-1/+0
XORG_STRICT_OPTION from XORG_DEFAULT_OPTIONS calls AC_PROG_C_C99. This sets gcc with -std=gnu99. If AC_PROG_CC macro is called afterwards, it resets CC to gcc. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-01-26libXi 1.4.1Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-01-26Fill in mods/group->effective in XIQueryPointer()Carlos Garnacho1-0/+3
the other XIModifierState/XIGroupState fields are being set correctly, but the "effective" field was being left as undefined memory. Signed-off-by: Carlos Garnacho <carlosg@gnome.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-01-11Fix passive grabs.Philipp Reh1-1/+1
_XIPassiveGrabDevice, which is called by alle the passive grab functions, wrongly returns an error when it shouldn't. The attached patch adds the missing "not" to properly test the error condition of _XReply. Signed-off-by: Philipp Reh <sefi@s-e-f-i.de> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-12-16Use docbookx.dtd version 4.3 for all docsPaulo Zanoni1-2/+2
Signed-off-by: Paulo Zanoni <pzanoni@mandriva.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-12-14WireToEvent: Set display member of all events as wellDaniel Stone1-0/+5
All events were getting random uninitialised garbage for display; fix that. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2010-11-09config: HTML file generation: use the installed copy of xorg.cssGaetan Nadon4-14/+4
Currenlty the xorg.css file is copied in each location where a DocBook/XML file resides. This produces about 70 copies in the $(docdir) install tree. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-11-03libXi 1.4Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-03man: XGetDeviceProperty(3) has no parameter 'pending'.Peter Hutterer1-5/+0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-10-06Purge cvs tags.Jesse Adkins1-2/+0
Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-10-07Fix typo when converting raw events from the wire.Carlos Garnacho1-1/+1
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>
2010-10-03man: fix typo in XIQueryDevice docJulien Cristau1-3/+3
Don't pretend this is XIQueryPointer. Debian bug#598964 Reported-by: Joachim Breitner <nomeata@debian.org> Signed-off-by: Julien Cristau <jcristau@debian.org>
2010-08-26Fix build with gcc 2.95Matthieu Herrb1-1/+1
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>
2010-08-26man: improve readability of XAllowDeviceEvents.Peter Hutterer1-28/+28
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>
2010-08-16man: add $(AM_V_GEN) for silent rules where missingGaetan Nadon1-6/+6
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-08-16man: whitespace managementGaetan Nadon1-72/+72
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>
2010-08-16man: Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONSGaetan Nadon1-13/+3
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>
2010-08-16man: add/change comments regarding the 3 step conversion from text sourceGaetan Nadon1-5/+12
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>
2010-08-16man: rename libman_pre to libman_PREGaetan Nadon1-4/+4
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>
2010-08-16man: use "shadows" terminology in variable names.Gaetan Nadon1-7/+7
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>
2010-08-16man: remove used LIB_MAN_DIR_SUFFIX (part of an unrequired broken fix)Gaetan Nadon1-2/+0
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>
2010-07-13Always unlock display correctlyPauli Nieminen1-18/+15
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>