summaryrefslogtreecommitdiff
path: root/randr
AgeCommit message (Collapse)AuthorFilesLines
2009-07-14randr: switch to byte counting functionsPeter Hutterer7-24/+24
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-15randr: fix typo in swapped dispatchAdam Jackson1-1/+1
2009-06-11randr: fix operation order so that rotation+transform worksBenjamin Defnet1-3/+3
The matrix multiply to combine rotation and projective transforms was being done in the wrong order. Signed-off-by: Keith Packard <keithp@keithp.com>
2009-06-09dix/randr: Add missing fields to SRR*NotifyEvent()Federico Mena Quintero1-2/+9
Also, remove redundant field swaps and make others match the order in which they are declared in the xRR*NotifyEvent structs. Signed-off-by: Federico Mena Quintero <federico@novell.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-06-08Make RANDR 'set' timestamps follow client specified time. Bug 21987.Keith Packard2-2/+7
The lastSetTime value which indicates when the configuration within the server was last changed was not getting set in the appropriate RandR requests. Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-24randr: fix server crash in RRGetScreenInfoJulien Cristau1-2/+3
We don't return rates to randr < 1.1 clients, so don't allocate space for them. This fixes a FatalError due to not all allocated space being used. X.Org bug#21861 <http://bugs.freedesktop.org/show_bug.cgi?id=21861> Reported-by: Guillaume Quintin <coincoin169g@gmail.com> Signed-off-by: Julien Cristau <jcristau@debian.org>
2009-04-29Fix most remaining deprecated resource lookups.Eamon Walsh7-144/+72
Callsites updated to use dixLookupResourceBy{Type,Class}. TODO: Audit access modes to make sure they reflect the usage.
2009-03-09Correct access mode in call to dixLookupWindow() within RRSelectInput.Eamon Walsh1-1/+1
Reported by Alan Coopersmith.
2009-02-25Oops. 62fc98c had crtc offsets applied backwards (fix from server-1.6-branch)Keith Packard1-2/+2
Crtc offsets are in screen space, not crtc space, and hence should be applied relative to the screen->crtc transform, not the crtc->transform. This fix was found in the 'cherry pick' of 62fc98c on server-1.6-branch, clearly some new definition of 'cherry pick' that I am unaware of. Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-25RandR rotations and reflections offset by one pixelKeith Packard1-14/+14
The matrix computation for rotation and reflection resulted in dropping a row or column of pixels as the offsets used in the matrix computations used width and height rather than width-1 and height-1. Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17RANDR: Fail softly on GetPanning if the screen can't do it.Adam Jackson1-16/+17
Just return a zeroed-out reply in that case. This is unambiguous, and distinguishes "you didn't name a CRTC" from "you named a CRTC that can't do panning".
2009-02-16xserver: Avoid sending uninitialized padding data over the networkPeter Åstrand1-1/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-13Query the DDX in ProcRRGetScreenInfo.Aaron Plattner1-1/+1
This is the RandR 1.1 version of GetScreenResources and needs to re-query the DDX to see if the mode pool changed. Fixes Launchpad bug #325115. Signed-off-by: Adam Jackson <ajax@redhat.com> (cherry picked from commit 660c2a7d4c6cb52fd0992e9d2008a24805dc8c02)
2009-02-03Handle matrix computation overflow in RRTransformComputeKeith Packard1-7/+32
If the computation of the composite fixed-point transform for RandR overflows at any point, take the resulting floating point transform and scale that back to fit in a fixed point matrix. This ensures that a matrix will always be available, although perhaps at reduced precision. Someday we should add floating point matrices to Render. Signed-off-by: Keith Packard <keithp@keithp.com>
2009-01-30RandR crtcs not fetched correctly when primary output is set.Keith Packard3-11/+19
Primary outputs may not have a CRTC. Loops fetching CRTCs respecting primary output were broken. Signed-off-by: Keith Packard <keithp@keithp.com>
2009-01-30randr: Avoid re-querying the configuration on everything but GetScreenResources.Eric Anholt4-12/+16
The new path should only re-query on the other requests when we haven't gathered the information from the DDX yet (such as with a non-RandR 1.2 DDX). Bug #19037.
2009-01-30RandR SetOutputPrimary should work with or without a crtc connectedKeith Packard1-5/+0
The test was inverted from the protocol spec, and besides, the test is bogus anyways. Signed-off-by: Keith Packard <keithp@keithp.com>
2009-01-30Make RandR CRTC info report panning area instead of just crtc areaKeith Packard1-5/+18
This makes the RandR info consistent with the Xinerama info. Signed-off-by: Keith Packard <keithp@keithp.com>
2009-01-11randr: RRSetPrimaryOutput can be staticJulien Cristau1-1/+1
2009-01-05 Update sdk headers to export new symbols.Paulo Cesar Pereira de Andrade1-2/+2
All symbols in installed sdk headers should be explicitly tagged as exported symbols. Otherwise, to ensure it is not a mistake, one could write it as something like: extern /* NOEXPORT */ type name ...; but the proper procedure really should be to use a non sdk header (or a "noinst_" one). This patch also removes prototypes to some functions that existed only temporarily.
2009-01-05RandR: Only export Xinerama symbols when building Xinerama supportDaniel Stone1-0/+2
Otherwise compilation fails due to sdksyms. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2008-12-19randr: Consider panned crtc's when calculating xinerama screen sizes.Maarten Maathuis1-7/+20
- This will allow window managers and applications to actually use the panned area.
2008-12-17randr: Improve per-crtc gamma support.Maarten Maathuis2-2/+45
- The Gamma values from the monitor section are now used during initial config. - The old colormap system is disabled when gamma set hook is available. - Gamma values are now persistent for the lifetime of the xserver. - This requires no driver changes and should be driver ABI compatible.
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-12-11randr: Oops, miscalculated panning rectangle's coordinatesMatthias Hopf1-4/+4
2008-12-10randr: clear primaryOutput when the output is deletedAdam Jackson1-0/+3
2008-12-10randr: use primary output for RRFirstOutput()Adam Jackson1-0/+3
2008-12-10randr: Mangle GetScreenResources sort order based on primary outputAdam Jackson1-3/+14
2008-12-10randr: Mangle compat Xinerama reply based on primary outputAdam Jackson1-17/+31
2008-12-10randr: Add [GS]etOutputPrimaryAdam Jackson4-1/+145
2008-12-05randr: Update SProcRandrVector for panningMatthias Hopf1-0/+39
2008-12-04randr: Nuke config-timestamp for panningMatthias Hopf1-15/+0
2008-12-04randr: Protocol bits for panning supportMatthias Hopf3-0/+188
2008-12-03randr: add swapped dispatch for RR[GS]etCrtcTransformJulien Cristau2-10/+25
Fix a memory leak in ProcRRGetCrtcTransform() while I'm at it. Signed-off-by: Julien Cristau <jcristau@debian.org> Cc: Keith Packard <keithp@keithp.com>
2008-12-03Rework symbol visibility for easier maintenancePaulo Cesar Pereira de Andrade15-214/+215
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-01randr: Don't send output property events on server exitAdam Jackson1-1/+2
If the Window resource type is already gone, there's no point in trying to send events, all it can do is access already-freed memory. Relevant thread: http://lists.freedesktop.org/archives/xorg/2008-November/040443.html
2008-11-30Remove declarations of symbols that are never defined.Paulo Cesar Pereira de Andrade1-12/+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 Andrade13-107/+107
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-26Add server support for RRGetScreenResourcesCurrentKeith Packard4-7/+24
This depends on randrproto 1.2.99.1 Signed-off-by: Keith Packard <keithp@keithp.com>
2008-11-25Move matrix operations from X server to pixman 0.13.2Keith Packard3-47/+47
pixman 0.13.2 now holds all of the matrix operations. This leaves the protocol conversion routines and some ABI stubs in place Signed-off-by: Keith Packard <keithp@keithp.com>
2008-11-24[randr] don't try to compute crtc transform when no mode is set.Keith Packard1-1/+1
Dereferencing the NULL mode pointer would cause a crash. As these transform matrices won't be used while the CRTC is disabled, just leave their values alone.
2008-11-24Update RandR global transform when driver notifies of transform change.Keith Packard1-0/+9
Need to compute and save the global transform when the driver changes it.
2008-11-24Export rrtransform.h as needed by randrstr.hKeith Packard1-1/+1
When the transform management was moved from randrstr.h, the associated header file became necessary to build drivers. Include it as a part of the sdk headers.
2008-11-24rrtransform needs randrstr to get RANDR_INTERFACE definesKeith Packard1-0/+1
2008-11-24Create rrtransform.[ch]. Add RRTransform argument to RRCrtcNotify.Keith Packard7-244/+350
Instead of using a separate function to notify DIX about transform changes, add the transform to RRCrtcNotify so that the whole Crtc state changes atomically.
2008-11-24Allow drivers to set crtc transforms.Keith Packard2-24/+36
Track curent transform down in the mode setting code so that it may be set separately from RandR.
2008-11-24Handle RandR transform matrices in floating point.Keith Packard2-54/+109
RandR matrix computations lose too much precision in fixed point; computations using the inverted matrix can be as much as 10 pixels off. Convert them to double precision values and pass those around. These API changes are fairly heavyweight; the official Render interface remains fixed point, so the fixed point matrix comes along for the ride everywhere.
2008-11-24Eliminate inverse matrix from randr transform protocolKeith Packard1-2/+0
It is easier, and potentially more precise, to compute the inverse in the server where everything can eventually be kept in floating point form.
2008-11-24Report whether transforms are support from driver through extension to clientKeith Packard2-2/+20
Add APIs to xf86RandR12 support and randr extension to record whether the driver supports transforms, report that value in the RRGetCrtcTransform reply.
2008-11-24Compute matrix inversion instead of using wire version in RRCrtcTransformSetKeith Packard1-3/+2
It doesn't make sense to have the client invert this matrix when the server can do so reasonably efficiently. This avoids weird fixed point rounding errors when testing the transform against its inverse. Now to fix the protocol.