summaryrefslogtreecommitdiff
path: root/Xi/grabdev.c
AgeCommit message (Collapse)AuthorFilesLines
2014-01-22Xi: Use 'void *' instead of 'Pointer' (which is going away)Keith Packard1-1/+1
There's no reason for XI to declare 'typedef char *Pointer' in a shared header file; assume it will eventually go away and stop using it here. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2013-08-30Xi: replace loop with memsetPeter Hutterer1-4/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com>
2012-07-09Use C99 designated initializers in Xinput RepliesAlan Coopersmith1-4/+6
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09Remove unneccesary casts from WriteToClient callsAlan Coopersmith1-1/+1
Casting return to (void) was used to tell lint that you intended to ignore the return value, so it didn't warn you about it. Casting the third argument to (char *) was used as the most generic pointer type in the days before compilers supported C89 (void *) (except for a couple places it's used for byte-sized pointer math). Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-03-21Indentation: Change '& stuff' to '&stuff'Daniel Stone1-1/+1
If the typedef wasn't perfect, indent would get confused and change: foo = (SomePointlessTypedef *) &stuff[1]; to: foo = (SomePointlessTypedef *) & stuff[1]; Fix this up with a really naïve sed script, plus some hand-editing to change some false positives in XKB back. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-21Introduce a consistent coding styleKeith Packard1-36/+37
This is strictly the application of the script 'x-indent-all.sh' from util/modular. Compared to the patch that Daniel posted in January, I've added a few indent flags: -bap -psl -T PrivatePtr -T pmWait -T _XFUNCPROTOBEGIN -T _XFUNCPROTOEND -T _X_EXPORT The typedefs were needed to make the output of sdksyms.sh match the previous output, otherwise, the code is formatted badly enough that sdksyms.sh generates incorrect output. The generated code was compared with the previous version and found to be essentially identical -- "assert" line numbers and BUILD_TIME were the only differences found. The comparison was done with this script: dir1=$1 dir2=$2 for dir in $dir1 $dir2; do (cd $dir && find . -name '*.o' | while read file; do dir=`dirname $file` base=`basename $file .o` dump=$dir/$base.dump objdump -d $file > $dump done) done find $dir1 -name '*.dump' | while read dump; do otherdump=`echo $dump | sed "s;$dir1;$dir2;"` diff -u $dump $otherdump done Signed-off-by: Keith Packard <keithp@keithp.com> Acked-by: Daniel Stone <daniel@fooishbar.org> Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-12-13input: replace GRABTYPE_* with the InputLevel enumsPeter Hutterer1-1/+1
They achieve the same thing, re-use the more generic InputLevel so we can convert to/fro easier. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-09-21Use internal temp variable for swap macrosMatt Turner1-10/+6
Also, fix whitespace, mainly around swaps(&rep.sequenceNumber) Reviewed-by: Peter Harris <pharris@opentext.com> Signed-off-by: Matt Turner <mattst88@gmail.com>
2009-07-30Xi: remove obsolete comment.Peter Hutterer1-1/+1
XI1 only uses 7 bits for deviceids, bit 8 is used for the MORE_EVENTS flag on the wire (when DeviceValuator events are required). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-14Xi: use byte-counting macros instead of manual calculation.Peter Hutterer1-2/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-23Xi: fix up access modes for calls to dixLookupDevice().Eamon Walsh1-1/+1
New access modes are being passed to the device access hook for XI2: DixCreateAccess for creating a new master device; DixAdd/RemoveAccess for attaching/removing slave devices to a master; and DixListProp/GetProp/SetPropAccess for device properties. Refer to the XACE-Spec document in xorg-docs, section "Device Access." Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
2009-06-03Xi: fix wrong grabtype from ProcXGrabDevice.Peter Hutterer1-1/+1
86077f0058ce88ee9b3df5d1ab854eeca43 switched from a boolean to a grabtype enum. ProcXGrabDevice didn't switch with it. PickPointer during an XI grab on a slave device would thus return a wrong (or NULL) device and crash the server. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19input: use a GrabMask union in GrabDevice to allow for XI2 masks.Peter Hutterer1-1/+4
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-20dix: move ProcGrabPointer guts into GrabDevice.Peter Hutterer1-3/+4
Yes, this means we have even more arguments to GrabDevice. But it beats having a copy of most but not all of GrabDevice in ProcGrabPointer. Also, reshuffle the order of parameters, the CARD* status is a return value and should be last. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-12-12Remove #define NEED_EVENTS and NEED_REPLIESPeter Hutterer1-2/+0
A grep on xorg/* revealed there's no consumer of this define. Quote Alan Coopersmith: "The consumer was in past versions of the headers now located in proto/x11proto - for instance, in X11R6.0's xc/include/Xproto.h, all the event definitions were only available if NEED_EVENTS were defined, and all the reply definitions required NEED_REPLIES. Looks like Xproto.h dropped them by X11R6.3, which didn't have the #ifdef's anymore, so these are truly ancient now." Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2008-01-26Merge branch 'master' into mpxPeter Hutterer1-7/+5
Conflicts: Xext/sampleEVI.c
2008-01-17Fix for CVE-2007-6427 - Xinput extension memory corruption.Matthieu Herrb1-7/+5
2008-01-03Merge branch 'master' into mpxPeter Hutterer1-7/+8
Conflicts: XTrap/xtrapddmi.c Xext/security.c Xext/xprint.c Xext/xtest.c Xext/xvdisp.c Xi/exevents.c Xi/grabdevb.c Xi/grabdevk.c Xi/opendev.c Xi/ungrdev.c Xi/ungrdevb.c Xi/ungrdevk.c dix/cursor.c dix/devices.c dix/dixutils.c dix/events.c dix/getevents.c dix/main.c dix/window.c hw/xfree86/ramdac/xf86Cursor.c include/dix.h include/input.h include/inputstr.h mi/midispcur.c mi/miinitext.c mi/misprite.c render/animcur.c xfixes/cursor.c xkb/xkbAccessX.c
2007-11-13Xi: remove trailing whitespaces.Peter Hutterer1-3/+3
2007-11-07Merge branch 'master' into mpxPeter Hutterer1-30/+19
Conflicts: Xi/extinit.c Xi/grabdev.c Xi/setmode.c Xi/ungrdev.c dix/devices.c dix/events.c dix/getevents.c include/dix.h mi/midispcur.c mi/misprite.c xkb/xkbActions.c xkb/xkbEvents.c xkb/xkbPrKeyEv.c
2007-09-28xace: add new hooks + access controls: XInput extension.Eamon Walsh1-7/+8
Introduces new dix API to lookup a device, dixLookupDevice(), which replaces LookupDeviceIntRec and LookupDevice.
2007-09-26Input: Return errors to the dispatcher instead of sending them ourself.Eamon Walsh1-30/+19
Also fixed two "unused variable: stuff" warnings.
2007-06-19Add a few comments to ProcXGrabDevice.Peter Hutterer1-1/+12
2007-05-14Add ExtendedGrabDevice handling.Peter Hutterer1-0/+7
Add XGE handling in DeliverGrabbedEvent. We can now grab something selecting XGE events, but the current code is a bit messy and doesn't work too well yet.
2007-04-03Make GrabDevice differ between core grabs and device grabs.Peter Hutterer1-1/+1
2007-03-29Xi: remove 'register' keywords.Peter Hutterer1-5/+5
2006-02-20indent fixes (OMG SO UGLY), and nuke old RCS keywords.Adam Jackson1-65/+54
2006-02-20ANSIfy Xi/. Mostly automated via protoize(1).Adam Jackson1-19/+8
2005-07-03Add Xtrans definitions (FONT_t, TRANS_CLIENT) to clean up warnings.Daniel Stone1-0/+4
Add XSERV_t, TRANS_SERVER, TRANS_REOPEN to quash warnings. Add #include <dix-config.h> or <xorg-config.h>, as appropriate, to all source files in the xserver/xorg tree, predicated on defines of HAVE_{DIX,XORG}_CONFIG_H. Change all Xfont includes to <X11/fonts/foo.h>.
2005-04-20Fix includes right throughout the Xserver tree:Daniel Stone1-4/+4
change "foo.h" to <X11/foo.h> for core headers, e.g. X.h, Xpoll.h; change "foo.h", "extensions/foo.h" and "X11/foo.h" to <X11/extensions/foo.h> for extension headers, e.g. Xv.h; change "foo.[ch]" to <X11/Xtrans/foo.[ch]> for Xtrans files.
2004-04-23Merging XORG-CURRENT into trunkEgbert Eich1-1/+1
2004-03-14Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004Egbert Eich1-1/+1
2004-03-03Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004Egbert Eich1-1/+1
2004-02-26readding XFree86's cvs IDsEgbert Eich1-1/+1
2004-02-26Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004Egbert Eich1-1/+1
2003-11-14XFree86 4.3.0.1Kaleb Keithley1-6/+9
2003-11-14R6.6 is the Xorg base-lineKaleb Keithley1-0/+225