summaryrefslogtreecommitdiff
path: root/xfixes/select.c
AgeCommit message (Collapse)AuthorFilesLines
2016-05-04dix: Push UpdateCurrentTimeIf down out of the main loopAdam Jackson1-0/+1
This was added in: commit 312910b4e34215aaa50fc0c6092684d5878dc32f Author: Chase Douglas <chase.douglas@canonical.com> Date: Wed Apr 18 11:15:40 2012 -0700 Update currentTime in dispatch loop Unfortunately this is equivalent to calling GetTimeInMillis() once per request. In the absolute best case (as on Linux) you're only hitting the vDSO; on other platforms that's a syscall. Either way it puts a pretty hard ceiling on request throughput. Instead, push the call down to the requests that need it; basically, grab processing and event generation. Cc: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-12-08xfixes: unvalidated length in SProcXFixesSelectSelectionInput [CVE-2014-8102]Alan Coopersmith1-0/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-01-12Replace 'pointer' type with 'void *'Keith Packard1-6/+6
This lets us stop using the 'pointer' typedef in Xdefs.h as 'pointer' is used throughout the X server for other things, and having duplicate names generates compiler warnings. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2012-07-09Use C99 designated initializers in extension EventsAlan Coopersmith1-13/+10
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-21Introduce a consistent coding styleKeith Packard1-162/+140
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-09-21Use internal temp variable for swap macrosMatt Turner1-5/+4
Also, fix whitespace, mainly around swaps(&rep.sequenceNumber) Reviewed-by: Peter Harris <pharris@opentext.com> Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-06-10Remove unnecessary parentheses around return values in functionsMikhail Gusarov1-1/+1
This patch was generated by the following Perl code: perl -i -pe 's/([^_])return\s*\(\s*([^(]+?)\s*\)s*;(\s+(\n))?/$1return $2;$4/g;' Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-19Set event sequence number in WriteEventsToClient instead of at callers.Jamey Sharp1-1/+0
TryClientEvents already did this; this commit just moves the assignment one level down so that no event source has to worry about sequence numbers. ...No event source, that is, except XKB, which inexplicably calls WriteToClient directly for several events. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-05-19Make WriteEventsToClient/WriteToClient no-op on fake or dead clients.Jamey Sharp1-2/+1
This matches the test in TryClientEvents, and is a superset of tests done by the callers of these functions. The consequence of forgetting these tests is a server crash, so they're always desirable. In my opinion, it's better to not require the callers to remember to do these checks. For callers that don't do very much work before calling WriteToClient or WriteEventsToClient, I've removed the redundant checks. hw/xquartz/xpr/appledri.c has an interesting case: While its check for "client == NULL" appears redundant with the test in WriteEventsToClient, it dereferences client to get the sequence number. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=27497 Signed-off-by: Jamey Sharp <jamey@minilop.net> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-05-13Replace X-allocation functions with their C89 counterpartsMikhail Gusarov1-3/+3
The only remaining X-functions used in server are XNF*, the rest is converted to plain alloc/calloc/realloc/free/strdup. X* functions are still exported from server and x* macros are still defined in header file, so both ABI and API are not affected by this change. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-12-18Add type name argument to CreateNewResourceTypeAlan Coopersmith1-8/+4
Convert all calls of CreateNewResourceType to pass name argument Breaks DIX ABI. ABI versions bumped: Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-18Ensure all resource types created have names registeredAlan Coopersmith1-0/+6
Calls RegisterResourceName to record the type name for use by X-Resource, XACE/SELinux/XTsol, and DTrace. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2009-04-29Fix most remaining deprecated resource lookups.Eamon Walsh1-1/+5
Callsites updated to use dixLookupResourceBy{Type,Class}. TODO: Audit access modes to make sure they reflect the usage.
2009-02-16xserver: Avoid sending uninitialized padding data over the networkPeter Åstrand1-0/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-10-02Unifdef ISCAdam Jackson1-0/+0
2008-02-22Normalize swapped dispatch for Fixes{ChangeSaveSet,SelectSelectionInput}Adam Jackson1-1/+1
2007-12-18XACE: Too many arguments to selection access hook.Eamon Walsh1-2/+1
2007-08-30xace: Correct some access modes.Eamon Walsh1-1/+1
2007-08-30xace: add hooks + new access codes: XFixes extension.Eamon Walsh1-1/+8
Required a new name argument to the selection access hook to handle XFixesSelectSelectionInput.
2007-06-29Death to RCS tags.Adam Jackson1-2/+0
2007-02-19Check for clientGone before sending events from XFixes (bug #1753).Keith Packard1-1/+3
Freeing resources during client closedown can cause cursor changes which attempt to send cursor events through the XFixes extension; a client in the process of closing down has no file to send events to, causing a crash when this path is hit.
2006-12-15Convert callers of SecurityLookupWindow() to dixLookupWindow().Eamon Walsh1-4/+4
2006-12-14Naming change: Security*Access -> Dix*AccessEamon Walsh1-1/+1
2005-07-03Fix more include paths; add dix-config.h to XKB code.Daniel Stone1-3/+0
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>.
2004-12-04Encoding of numerous files changed to UTF-8Markus Kuhn1-1/+1
2004-07-29bugzilla 859 -merging DAMAGE-XFIXES into trunkStuart Kreitman1-0/+278