Commit Graph

131 Commits

Author SHA1 Message Date
Keith Packard
faeebead7b Change the devPrivates API to require dixRegisterPrivateKey
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-05 19:23:03 -07:00
Jamey Sharp
e7fae9ecc4 Move each screen's root-window pointer into ScreenRec.
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-06-03 14:03:23 -07:00
Mikhail Gusarov
3f3ff971ec Replace X-allocation functions with their C89 counterparts
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-05-13 00:22:37 +07:00
Keith Packard
0e91e19f78 Merge remote branch 'vignatti/for-keith' 2010-04-30 12:27:51 -07:00
Adam Jackson
2a763c9023 dix: Default DPMS timeout values to match screensaver values
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-26 20:04:39 -07:00
Tiago Vignatti
4f8dc1109d dix and others: remove unused arraySize field from ScreenInfo
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-04-26 14:35:27 +03:00
Peter Hutterer
d33adcdf03 dix: move config_init into the DDX.
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-15 09:15:18 +10:00
Julien Cristau
901c4ebf62 main: move config_init() after InitInput()
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>
2010-02-05 10:38:52 +10:00
Keith Packard
d3e054ac07 Merge remote branch 'jeremyhu/master' 2009-12-11 09:22:22 -08:00
Julien Cristau
3fad969a90 Move config_init() after CreateWellKnownSockets() and InitCoreDevices()
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-11 11:37:36 +10:00
Jeremy Huddleston
1b8f90aa8b Miscellaneous compilation warning fixes
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-12-08 15:50:28 -08:00
Soren Sandmann Pedersen
211511f150 Disable the out-of-bounds workaround in pixman.
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-08-11 14:40:42 -04:00
Peter Hutterer
d3f6b43a24 Update to xextproto 7.0.99.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-07-15 17:00:05 +10:00
Peter Hutterer
c2c515ead3 dix: remove all but main() from main.c
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-28 16:03:56 +10:00
Eric Anholt
4474c200a1 Move VENDOR_* defines from AC_SUBST to a header to avoid angering shave.
This is more sane anyway, as it ensures a rebuild when changing them.
2009-04-14 10:35:44 -04:00
Adam Jackson
6574ab092f DPMS: Remove the defaultDPMS* variables 2009-04-03 18:22:20 -04:00
Peter Åstrand
ddb8d8945d xserver: Avoid sending uninitialized padding data over the network
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-16 13:28:38 +10:00
Peter Hutterer
340f1576af dix: remove DefineInitialRootWindow()
Obsolete.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-13 14:41:57 +10:00
Adam Jackson
132b464d73 Remove a bunch of useless casts.
We've had void * for twenty years now people let's try to act like we
know how it works.
2009-01-22 02:11:16 -05:00
Jeremy Huddleston
ca46c01869 XQuartz: mieq: Wait for the server to finish initializing before letting other threads mieqEnqueue
Avoid possible race condition whereby one thread might call mieqEnqueue before InitAndStartDevices finishes
(cherry picked from commit 94e417ac87)
2009-01-16 13:58:20 -08:00
Peter Hutterer
cb95642dc8 Remove #define NEED_EVENTS and NEED_REPLIES
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-12 11:43:32 +10:00
Paulo Cesar Pereira de Andrade
49f77fff14 Rework symbol visibility for easier maintenance
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-12-03 05:43:34 -02:00
Paulo Cesar Pereira de Andrade
d6cbd4511e Export symbols defined in the sdk.
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-29 23:56:06 -02:00
Peter Hutterer
e078901a4e dix: Enable core devices in InitCoreDevices already.
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-11-24 10:17:40 +10:00
Julien Cristau
add946daed Nuke unused variables 2008-10-26 11:44:10 +01:00
Adam Jackson
94825ad3c7 Remove unused wrapping for visual initialization. 2008-10-03 17:51:21 -04:00
Adam Jackson
e6b1c1fada const cleanup 2008-10-03 17:51:19 -04:00
Adam Jackson
00f01f3945 Don't inherit XAUTHORITY from the environment.
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-10-02 15:48:18 -04:00
Adam Jackson
64ef7ed072 Centralize declaration of ConnectionInfo. 2008-08-20 13:14:34 -04:00
Adam Jackson
0ce687634f Eviscerate save-under support.
Use a compositing manager already.  Plus I really wanted to use 'eviscerate'
in a commit message.
2008-08-13 17:28:08 -04:00
Tomas Carnecky
277a74bcbb Redefine clients as a fixed array
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-05 01:17:32 +03:00
Tomas Carnecky
5532d63488 Redefine WindowTable as a fixed array
Instead of xalloc'ing it every server generation. The array is always
the same size (MAXSCREENS), anyway.
2008-08-05 01:17:32 +03:00
Daniel Stone
6b5206e7cb dix: Remove insane BC hacks
If your DDX needs a 1bpp mode and doesn't set it up, your DDX is
incompetent.
2008-07-21 03:50:15 +03:00
Adam Jackson
af2138bfce Nuke some ancient code for commandline-challenged OSes.
This appears to have been dead code even in 6.7.
2008-07-17 10:39:29 -04:00
Adam Jackson
a82e6efb7b Remove the numVideoScreens xprintism.
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-07-16 14:19:04 -04:00
Peter Hutterer
a81b5ce452 dix: free memory associated with the EventList. #16507
Un-deprecates CloseDownEvents.

X.Org Bug 16507 <http://bugs.freedesktop.org/show_bug.cgi?id=16507>
2008-06-25 20:03:31 +09:30
Peter Hutterer
26c1958c32 Merge branch 'master' into mpx 2008-05-26 17:37:31 +09:30
George Sapountzis
255142b61e drop xprint remnants: InitGlobals 2008-05-21 18:13:09 +03:00
Peter Hutterer
7a550cefd9 dix: shut up two compiler warnings. 2008-05-20 11:07:39 +09:30
Peter Hutterer
99d28c3ef3 Merge branch 'master' into mpx
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-20 10:20:14 +09:30
Adam Jackson
166177e36b Simplify default font path setup. 2008-05-14 16:02:05 -04:00
Adam Jackson
2efe1abb6f Remove global argc/argv variables.
Was only used in the logging code anymore, and uselessly so there.
2008-05-14 15:53:11 -04:00
Peter Hutterer
00db0f35ac dix: InitAndStartDevices doesn't need a window parameter.
Leftover from the old pointer-keyboard pairing code, obsolete and gone now.
2008-05-14 15:29:28 +09:30
Adam Jackson
1c8bd318fb X n'est pas une print API. 2008-05-12 14:15:11 -04:00
Peter Hutterer
3344569529 Merge branch 'master' into mpx
Conflicts:

	Xi/exevents.c
	dix/devices.c
2008-05-02 11:00:14 +09:30
Jeremy Huddleston
ef1c520537 XQuartz: Cleaned up startup and thread creation a tad.
(cherry picked from commit c861fe00e1)
2008-04-26 19:21:05 -07:00
Peter Hutterer
89add4ee98 dix: remove obsolete InitWindowPrivates(). 2008-04-25 14:30:26 +09:30
Peter Hutterer
aec485f2dc dix: NULL out WindowTable after freeing all the windows.
CloseDownDevices() tries to send PresenceNotify events. If the windows are
already freed, then we are accessing dangling pointers.
2008-04-24 14:19:28 +09:30
Peter Hutterer
8190ef8754 Merge branch 'master' into mpx
Conflicts:

	Xext/EVI.c
	Xext/appgroup.c
	Xext/cup.c
	Xext/mitmisc.c
	Xext/sampleEVI.c
	dix/window.c
2008-04-22 18:04:05 +09:30
Ben Byer
fa0645b452 removed Xquartz debugging code that leaked into master. Our Bad. 2008-04-17 12:27:12 -07:00