summaryrefslogtreecommitdiff
path: root/dix/main.c
AgeCommit message (Collapse)AuthorFilesLines
2011-05-25Don't call pixman_disable_out_of_bounds_workaround() anymoreSøren Sandmann Pedersen1-2/+0
Pixman used to have a workaround for a bug in old X servers, and this function was used to disable that workaround in servers known to be fixed. Since 0.22, which the X server depends on, the workaround doesn't exist anymore, so there is no point disabling it. Reviewed-by: Cyril Brulebois <kibi at debian.org> Signed-off-by: Soren Sandmann <sandmann@cs.au.dk>
2011-05-14XQuartz: Don't call mieqEnqueue during server shutdownJeremy Huddleston1-9/+16
Found-by: GuardMalloc Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-12-23os: Add facilities for client ID tracking.Rami Ylimäki1-0/+3
An interface is provided for figuring out the PID and process name of a client. Make some existing functionality from SELinux and IA extensions available for general use. Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-09-28dix: remove proc tables initializationTiago Vignatti1-4/+0
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-06-30Initialize dev privates before using anyKeith Packard1-1/+3
Initializing the dev privates code after allocating the server client dev privates would cause the memory leak check to fire at server startup or reset. Signed-off-by: Keith Packard <keithp@keithp.com> Acked-by: Daniel Stone <daniel@fooishbar.org>
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-06-05Change the devPrivates API to require dixRegisterPrivateKeyKeith Packard1-7/+14
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-2/+3
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-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>
2010-04-30Merge remote branch 'vignatti/for-keith'Keith Packard1-1/+0
2010-04-26dix: Default DPMS timeout values to match screensaver valuesAdam Jackson1-3/+1
These have the same default, but if you specify something different with -s on the command line, only the screensaver time is changed. As DPMS is usually what's desired, change it to match. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-04-26dix and others: remove unused arraySize field from ScreenInfoTiago Vignatti1-1/+0
Bizarre. This seems to never be used before. I left the field in ScreenInfo, with another name. So, stop looking at it. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-02-15dix: move config_init into the DDX.Peter Hutterer1-2/+1
The only DDX currently using hotplugging is the xfree86 one and it looks like it'll stay that way for a bit. Move the initialization to the DDX, since Xephyr, Xnest, and friends don't need HAL or udev notifications. Add CloseInput (counterpart to InitInput) to be able to clean up the config initialization from the DDX as well. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-02-05main: move config_init() after InitInput()Julien Cristau1-1/+1
With the udev backend, config_init() calls NewInputDeviceRequest(), which enables devices. They can then start sending events, even though the event queue is only initialized later in InitInput(). Oops. Debian bug#564256 <http://bugs.debian.org/564256> Reported-by: Sedat Dilek <sedat.dilek@googlemail.com> Signed-off-by: Julien Cristau <jcristau@debian.org> Tested-by: Sedat Dilek <sedat.dilek@googlemail.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-12-11Merge remote branch 'jeremyhu/master'Keith Packard1-0/+2
2009-12-11Move config_init() after CreateWellKnownSockets() and InitCoreDevices()Julien Cristau1-1/+1
config_init() can now add devices directly instead of scheduling a timer. Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-12-08Miscellaneous compilation warning fixesJeremy Huddleston1-0/+2
main.c:134: warning: no previous prototype for 'dix_main' rootlessScreen.c: In function 'RootlessMarkOverlappedWindows': rootlessScreen.c:434: warning: function declaration isn't a prototype backtrace.c:51: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'int' backtrace.c:54: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'int' set.c: In function 'RecordSetMemoryRequirements': set.c:413: warning: old-style function definition set.c: In function 'RecordCreateSet': set.c:425: warning: old-style function definition stub.c: In function ‘main’: stub.c:236: warning: ISO C90 forbids mixed declarations and code Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2009-08-11Disable the out-of-bounds workaround in pixman.Soren Sandmann Pedersen1-0/+3
This workaround was necessary for older X servers, but now fb should be using correct coordinates. Also bump pixman requirement to 0.15.20.
2009-07-15Update to xextproto 7.0.99.1.Peter Hutterer1-2/+1
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-04-28dix: remove all but main() from main.cPeter Hutterer1-368/+0
All other functions are pushed into where they seemed to fit. main.c is now linked separately into libmain.a and linked in by the various DDXs. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-14Move VENDOR_* defines from AC_SUBST to a header to avoid angering shave.Eric Anholt1-0/+1
This is more sane anyway, as it ensures a rebuild when changing them.
2009-04-03DPMS: Remove the defaultDPMS* variablesAdam Jackson1-4/+4
2009-02-16xserver: Avoid sending uninitialized padding data over the networkPeter Åstrand1-4/+8
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-13dix: remove DefineInitialRootWindow()Peter Hutterer1-1/+0
Obsolete. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22Remove a bunch of useless casts.Adam Jackson1-2/+2
We've had void * for twenty years now people let's try to act like we know how it works.
2009-01-16XQuartz: mieq: Wait for the server to finish initializing before letting ↵Jeremy Huddleston1-0/+14
other threads mieqEnqueue Avoid possible race condition whereby one thread might call mieqEnqueue before InitAndStartDevices finishes (cherry picked from commit 94e417ac87a98cd5c6bf2d7c495d702748398931)
2008-12-12Remove #define NEED_EVENTS and NEED_REPLIESPeter Hutterer1-1/+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 Andrade1-6/+6
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-29Export symbols defined in the sdk.Paulo Cesar Pereira de Andrade1-4/+4
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-11-24dix: Enable core devices in InitCoreDevices already.Peter Hutterer1-2/+1
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2008-10-26Nuke unused variablesJulien Cristau1-1/+0
2008-10-03Remove unused wrapping for visual initialization.Adam Jackson1-1/+0
2008-10-03const cleanupAdam Jackson1-1/+1
2008-10-02Don't inherit XAUTHORITY from the environment.Adam Jackson1-4/+0
It's not especially obvious, and unpleasantly overloaded for the Xnest case. Typically this gives you a server that looks for its auth data in the authority file you were using for the running X session, which generally doesn't have an entry for the display you just started. All the major dm's, and startx, pass -auth explicitly, so this shouldn't cause too much upheaval.
2008-08-20Centralize declaration of ConnectionInfo.Adam Jackson1-1/+0
2008-08-13Eviscerate save-under support.Adam Jackson1-1/+1
Use a compositing manager already. Plus I really wanted to use 'eviscerate' in a commit message.
2008-08-05Redefine clients as a fixed arrayTomas Carnecky1-4/+1
This removes yet another xalloc() each server generation. Also, I couldn't find the corresponding xfree() so I guess that used to be a memory leak there.
2008-08-05Redefine WindowTable as a fixed arrayTomas Carnecky1-6/+1
Instead of xalloc'ing it every server generation. The array is always the same size (MAXSCREENS), anyway.
2008-07-21dix: Remove insane BC hacksDaniel Stone1-12/+1
If your DDX needs a 1bpp mode and doesn't set it up, your DDX is incompetent.
2008-07-17Nuke some ancient code for commandline-challenged OSes.Adam Jackson1-4/+0
This appears to have been dead code even in 6.7.
2008-07-16Remove the numVideoScreens xprintism.Adam Jackson1-3/+0
This was to account for cases where you had video and print screens in the same server. Lunacy. Leave the slot in ScreenInfo, but rename it, and stop looking at it.
2008-06-25dix: free memory associated with the EventList. #16507Peter Hutterer1-0/+1
Un-deprecates CloseDownEvents. X.Org Bug 16507 <http://bugs.freedesktop.org/show_bug.cgi?id=16507>
2008-05-26Merge branch 'master' into mpxPeter Hutterer1-1/+0
2008-05-21drop xprint remnants: InitGlobalsGeorge Sapountzis1-1/+0
2008-05-20dix: shut up two compiler warnings.Peter Hutterer1-1/+1
2008-05-20Merge branch 'master' into mpxPeter Hutterer1-21/+2
Conflicts: Xext/xprint.c (removed in master) config/hal.c dix/main.c hw/kdrive/ati/ati_cursor.c (removed in master) hw/kdrive/i810/i810_cursor.c (removed in master) hw/xprint/ddxInit.c (removed in master) xkb/ddxLoad.c
2008-05-14Simplify default font path setup.Adam Jackson1-7/+2
2008-05-14Remove global argc/argv variables.Adam Jackson1-5/+0
Was only used in the logging code anymore, and uselessly so there.
2008-05-14dix: InitAndStartDevices doesn't need a window parameter.Peter Hutterer1-1/+1
Leftover from the old pointer-keyboard pairing code, obsolete and gone now.
2008-05-12X n'est pas une print API.Adam Jackson1-9/+0