summaryrefslogtreecommitdiff
path: root/hw/xfree86/dixmods/extmod
AgeCommit message (Collapse)AuthorFilesLines
2010-09-28xserver: delete pervasively use of DISPATCH_PROCTiago Vignatti4-163/+81
Some functions had to be moved around due some missing static definitions. Another minor clean up like inexistent function declarations and etc were made also. Part of this patch was cooked using: sed -i -e '/static DISPATCH_PROC*.*;/d' `git ls-files` Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-06-10Remove unnecessary parentheses around return values in functionsMikhail Gusarov2-10/+10
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-06-06Remove more superfluous if(p) checks around free(p)Mikhail Gusarov1-2/+1
This patch has been generated by the following Coccinelle semantic patch: @@ expression E; @@ -if(E) { free(E); } +free(E); Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Reviewed-by: Matt Turner <mattst88@gmail.com>
2010-06-05Change the devPrivates API to require dixRegisterPrivateKeyKeith Packard2-13/+24
This patch only changes the API, not the implementation of the devPrivates infrastructure. This will permit a new devPrivates implementation to be layed into the server without requiring simultaneous changes in every devPrivates user. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-06-03Move each screen's root-window pointer into ScreenRec.Jamey Sharp1-1/+1
Many references to the WindowTable array already had the corresponding screen pointer handy, which meant they usually looked like "WindowTable[pScreen->myNum]". Adding a field to ScreenRec instead of keeping this information in a parallel array simplifies those expressions, and eliminates a MAXSCREENS-sized array. Since dix uses this data, a screen private entry isn't appropriate. xf86-video-dummy currently uses WindowTable, so it needs to be updated to reflect this change. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux)
2010-05-19Return an appropriately-typed error from dixLookupResourceByType.Jamey Sharp1-2/+2
Rather than always returning BadValue, associate an error status like BadWindow with a resource type like RT_WINDOW, and return the appropriate one for the requested type. This patch only touches the core protocol resource types. Others still return BadValue and need to be mapped appropriately. dixLookupResourceByType can now return BadImplementation, if the caller asked for a resource type that has not been allocated in the server. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-05-19Set event sequence number in WriteEventsToClient instead of at callers.Jamey Sharp1-4/+1
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/+0
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-13Eliminate boilerplate around client->noClientException.Jamey Sharp2-56/+52
Just let Dispatch() check for a noClientException, rather than making every single dispatch procedure take care of it. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-05-13Replace X-allocation functions with their C89 counterpartsMikhail Gusarov3-31/+31
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>
2010-04-23xfree86: use screen privates for exclusive DGA clientsJamey Sharp1-33/+37
Most DGA requests allow at most one client to be using DGA on each screen. Instead of keeping track of the current client in a MAXSCREEN-sized array, track it in a per-screen private. Signed-off-by: Jamey Sharp <jamey@minilop.net> Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-04-21Death to Multibuffer extensionTiago Vignatti2-14/+0
The rationale behind is because no sane application will use this when we have modern APIs such DRI2. Besides, as a fact, xfree86 server has already deprecated this extension in 1998: http://www.xfree86.org/3.3.6/isc7.html Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2009-12-18Add type name argument to CreateNewResourceTypeAlan Coopersmith1-3/+1
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/+2
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-09-21input: define server-supported protocol versions in one single file.Peter Hutterer2-4/+6
include/protocol-versions.h specifies each extension version as supported by the server and sent back on the wire to the client. This fixes up several issues with the server potentially reporting a higher version of the protocol if recompiled against a newer version of the protocol. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Rémi Cardona <remi@gentoo.org> Acked-by: Julien Cristau <jcristau@debian.org>
2009-09-21xfree86: silence warning: ‘ramplen’ may be used uninitializedPeter Hutterer1-1/+1
'ramplen' is only set and used if stuff->size > 0 but the compiler doesn't pick that up. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-04require xf86vidmodeproto 2.2.99.1 or newer.Peter Hutterer2-4/+2
2009-08-27xfree86: require xf86dgaproto 2.0.99.1.Peter Hutterer2-5/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-15Update to xextproto 7.0.99.1.Peter Hutterer1-9/+5
xextproto had Xlib client headers moved into libXext. Protocol header files are named fooproto.h, header files with constants foo.h or fooconst.h where foo.h was already in use for client-side headers.
2009-07-14xfree86: switch to byte counting functionsPeter Hutterer2-25/+25
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-17xfree86: fix two compiler warnings in xf86vmode.cPeter Hutterer1-2/+2
xf86vmode.c:1578: warning: pointer targets in passing argument 1 of ‘SwapShorts’ differ in signedness ../../../../include/misc.h:231: note: expected ‘short int *’ but argument is of type ‘CARD16 *’ xf86vmode.c:1543: warning: unused variable ‘i’ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-29Fix most remaining deprecated resource lookups.Eamon Walsh1-8/+10
Callsites updated to use dixLookupResourceBy{Type,Class}. TODO: Audit access modes to make sure they reflect the usage.
2009-04-24Fix byte swapping of XF86VidMode{Get,Set}GammaRampAlan Coopersmith1-10/+6
Fixes OpenSolaris Bug 8315: Xorg segfaults when screensaver fades in cross-endian xdmcp session <http://defect.opensolaris.org/bz/show_bug.cgi?id=8315> Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-03-04Remove dead XTest code from extmodTomas Carnecky1-9/+0
Signed-off-by: Tomas Carnecky <tom@dbservice.com>
2009-01-11xfree86: ANSI cleanupsJulien Cristau1-1/+1
2008-12-12Remove #define NEED_EVENTS and NEED_REPLIESPeter Hutterer2-4/+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-12-03Rework symbol visibility for easier maintenancePaulo Cesar Pereira de Andrade4-110/+33
Save in a few special cases, _X_EXPORT should not be used in C source files. Instead, it should be used in headers, and the proper C source include that header. Some special cases are symbols that need to be shared between modules, but not expected to be used by external drivers, and symbols that are accessible via LoaderSymbol/dlopen. This patch also adds conditionally some new sdk header files, depending on extensions enabled. These files were added to match pattern for other extensions/modules, that is, have the headers "deciding" symbol visibility in the sdk. These headers are: o Xext/panoramiXsrv.h, Xext/panoramiX.h o fbpict.h (unconditionally) o vidmodeproc.h o mioverlay.h (unconditionally, used only by xaa) o xfixes.h (unconditionally, symbols required by dri2) LoaderSymbol and similar functions now don't have different prototypes, in loaderProcs.h and xf86Module.h, so that both headers can be included, without the need of defining IN_LOADER. xf86NewInputDevice() device prototype readded to xf86Xinput.h, but not exported (and with a comment about it).
2008-11-30Remove declarations of symbols that are never defined.Paulo Cesar Pereira de Andrade1-2/+0
These symbols were removed from the X Server, or never declared. One symbol that may need special attention is XkbBuildCoreState(), that doesn't have a prototype anywhere, but is called from xkb/xkbEvents.c:XkbFilterEvents(), and also used by the macros XkbStateFieldFromRec() and XkbGrabStateFromRec() defined in include/xkbstr.h. fb/wfbrename.h also may need some cleanup, as it makes several "renames" of non existing symbols.
2008-11-29Export symbols defined in the sdk.Paulo Cesar Pereira de Andrade1-3/+3
This is the biggest "visibility" patch. Instead of doing a "export" symbol on demand, export everything in the sdk, so that if some module fails due to an unresolved symbol, it is because it is using a symbol not in the sdk. Most exported symbols shouldn't really be made visible, neither advertised in the sdk, as they are only used by a single shared object. Symbols in the sdk (or referenced in sdk macros), but not defined anywhere include: XkbBuildCoreState() XkbInitialMap XkbXIUnsupported XkbCheckActionVMods() XkbSendCompatNotify() XkbDDXFakePointerButton() XkbDDXApplyConfig() _XkbStrCaseCmp() _XkbErrMessages[] _XkbErrCode _XkbErrLocation _XkbErrData XkbAccessXDetailText() XkbNKNDetailMaskText() XkbLookupGroupAndLevel() XkbInitAtoms() XkbGetOrderedDrawables() XkbFreeOrderedDrawables() XkbConvertXkbComponents() XkbWriteXKBSemantics() XkbWriteXKBLayout() XkbWriteXKBKeymap() XkbWriteXKBFile() XkbWriteCFile() XkbWriteXKMFile() XkbWriteToServer() XkbMergeFile() XkmFindTOCEntry() XkmReadFileSection() XkmReadFileSectionName() InitExtInput() xf86CheckButton() xf86SwitchCoreDevice() RamDacSetGamma() RamDacRestoreDACValues() xf86Bpp xf86ConfigPix24 xf86MouseCflags[] xf86SupportedMouseTypes[] xf86NumMouseTypes xf86ChangeBusIndex() xf86EntityEnter() xf86EntityLeave() xf86WrapperInit() xf86RingBell() xf86findOptionBoolean() xf86debugListOptions() LoadSubModuleLocal() LoaderSymbolLocal() getInt10Rec() xf86CurrentScreen xf86ReallocatePciResources() xf86NewSerialNumber() xf86RandRSetInitialMode() fbCompositeSolidMask_nx1xn fbCompositeSolidMask_nx8888x0565C fbCompositeSolidMask_nx8888x8888C fbCompositeSolidMask_nx8x0565 fbCompositeSolidMask_nx8x0888 fbCompositeSolidMask_nx8x8888 fbCompositeSrc_0565x0565 fbCompositeSrc_8888x0565 fbCompositeSrc_8888x0888 fbCompositeSrc_8888x8888 fbCompositeSrcAdd_1000x1000 fbCompositeSrcAdd_8000x8000 fbCompositeSrcAdd_8888x8888 fbGeneration fbIn fbOver fbOver24 fbOverlayGeneration fbRasterizeEdges fbRestoreAreas fbSaveAreas composeFunctions VBEBuildVbeModeList() VBECalcVbeModeIndex() TIramdac3030CalculateMNPForClock() shadowBufPtr shadowFindBuf() miRRGetScreenInfo() RRSetScreenConfig() RRModePruneUnused() PixmanImageFromPicture() extern int miPointerGetMotionEvents() miClipPicture() miRasterizeTriangle() fbPush1toN() fbInitializeBackingStore() ddxBeforeReset() SetupSprite() InitSprite() DGADeliverEvent() SPECIAL CASES o defined as _X_INTERNAL xf86NewInputDevice() o defined as static fbGCPrivateKey fbOverlayScreenPrivateKey fbScreenPrivateKey fbWinPrivateKey o defined in libXfont.so, but declared in xorg/dixfont.h GetGlyphs() QueryGlyphExtents() QueryTextExtents() ParseGlyphCachingMode() InitGlyphCaching() SetGlyphCachingMode()
2008-10-09DGA: Track client state even when using old style DGA.Luc Verhaegen1-10/+35
This fixes the issue that a badly killed DGA will keep on hogging mode/framebuffer/mouse/keyboard.
2008-10-09DGA: Mash together xf86dga.c and xf86dga2.c.Luc Verhaegen3-341/+311
This in preparation for an upcoming client state tracking fix.
2008-10-08DGA: Fix ProcXF86DGASetViewPort for missing support in driver.Luc Verhaegen1-2/+5
Fixes a segfault when trying to activate a DGA mode without checking whether DGA modesetting is at all possible.
2008-08-28Prepare for array-index based devPrivates.Tomas Carnecky2-4/+7
TODO: static indices can be made just an int; some indices can be combined.
2008-08-28MIT-SHM pixmaps, if they exist, are ZPixmap.Adam Jackson1-3/+0
2008-08-05Redefine WindowTable as a fixed arrayTomas Carnecky1-2/+1
Instead of xalloc'ing it every server generation. The array is always the same size (MAXSCREENS), anyway.
2008-07-24Sync is built-in and mandatory.Adam Jackson2-16/+0
2008-07-24XC-MISC is built-in and mandatory.Adam Jackson2-14/+0
2008-07-24Remove all empty extension reset hooks, replace with NULL.Adam Jackson1-12/+1
2008-07-24Bigreqs are built-in and mandatory.Adam Jackson2-14/+0
2008-07-24Shape extension is built-in and mandatory.Adam Jackson2-11/+0
2008-07-18Drop the FONTCACHE extension.Adam Jackson2-16/+0
This appears to have been dead code since X-TT was merged.
2008-07-16XFree86: Remove XFree86-Misc extensionDaniel Stone5-911/+0
Its last remaining purpose in life has been destroyed by input properties. Au revoir: it's been fun, by which I mean awful.
2008-06-13Fix "warning: no previous prototype for ‘XevieExtensionInit’".Eamon Walsh1-0/+4
2008-06-13Death to mfb.Adam Jackson1-1/+0
Anyone still interested in 1 or 4 bpp framebuffers, talk to fb.
2008-05-26Merge branch 'master' into mpxPeter Hutterer1-1/+0
2008-05-21Clean up remaining afb references.Kristian Høgsberg1-1/+0
2008-04-22Merge branch 'master' into mpxPeter Hutterer3-54/+0
Conflicts: Xext/EVI.c Xext/appgroup.c Xext/cup.c Xext/mitmisc.c Xext/sampleEVI.c dix/window.c
2008-04-18Death to TOG-CUP.Adam Jackson2-15/+0
If you still care about 8bpp visuals that much, fix Composite to provide synthetic visuals.
2008-04-18Nuke the MIT-SUNDRY-NONSTANDARD extension.Eric Anholt2-15/+0
This extension provided bug-compatibility with pre-X11R6, but has been stubbed out in our server since 2006 to return BadRequest when you actually asked for it.
2008-04-18Death to APPGROUP.Adam Jackson1-8/+0