summaryrefslogtreecommitdiff
path: root/randr
AgeCommit message (Collapse)AuthorFilesLines
2007-08-08RRScanOldConfig cannot use RRFirstOutput before output is configured.Keith Packard1-1/+1
RRFirstOutput returns the first active output, which won't be set until after RRScanOldConfig is finished running. Instead, just use the first output (which is the only output present with an old driver, after all).
2007-08-07RRScanOldConfig wasn't getting crtcs set correctlyKeith Packard1-3/+4
The output crtc is set by RRCrtcNotify, which is called at the end of RRScanOldConfig. Several uses of output->crtc in this function were wrong.
2007-08-07Decrement mode count when removing RandR output mode.Keith Packard1-0/+1
Removing an output mode without decrementing the mode count scrambles the output mode array badly.
2007-07-31Fix a crash when rotating the screen.Aaron Plattner1-3/+6
Remember output->crtc before setting a NULL mode because RRCrtcNotify now sets output->crtc to NULL. Use the saved crtc to set the new mode.
2007-07-25Fix the output->crtc initialization in the old randr setupGustavo Pichorim Boiko1-0/+1
2007-07-23Set the crtc before the output change is notifiedGustavo Pichorim Boiko4-15/+2
Set the new randr crtc of the output before the output change notification is delivered to the clients. Remove RROutputSetCrtc as it is not really necessary. All we have to do is set the output's crtc on RRCrtcNotify
2007-07-14Screen size bounds check in ProcRRSetCrtcConfig not masking out reflections.Keith Packard1-1/+1
When checking how to validate the selected mode and position against the current screen size, the test against 90/270 rotation did not mask out reflection, so that when reflection was specified, the 90/270 test would never succeed. This caused incorrect bounds checking and would return an error to the user instead of rotating the screen.
2007-05-24Fix build of composite, dix, and randr when Xinerama is disabled.Luo Jie2-3/+10
2007-04-25Disable RANDR's fake Xinerama protocol when there's more than one screen.Adam Jackson1-0/+8
... in the protocol sense. Xinerama doesn't have any provision for more than one protocol screen each with its own geometry. Red Hat bug #231257.
2007-04-16RandR 1.2 spec says CRTC info contains screen-relative geometry.Keith Packard1-2/+4
Was reporting mode size instead of adjusting for rotation. (cherry picked from commit e2e7c47a528447e90cff6cf10d2ce457742ef48d)
2007-04-10Rotate screen size as needed from RandR 1.1 change requests.Keith Packard1-3/+10
Screen size must reflect rotated mode size when setting rotated mode using RandR 1.1 SetScreenConfig request. (cherry picked from commit efcec7dbd3c2736c7b421d29c4d37e231aa681d2)
2007-04-03Swap RRScreenChangeNotifyEvent dimensions when the screen has one crtc and ↵Aaron Plattner1-5/+13
it's rotated. RandR 1.1 clients expect the size fields in this event to be the unrotated dimensions of the screen. This behavior is "weird", but that's the way the old code worked so we need to be bug-compatible with it.
2007-03-24Make pending properties force mode set. And, remove AttachScreen calls.Keith Packard6-147/+138
Yes, two changes in one commit. Sorry 'bout that. The first change ensures that when pending property values have been changed, a mode set to the current mode will actually do something, rather than being identified as a no-op. In addition, the driver no longer needs to manage the migration of pending to current values, that is handled both within the xf86 mode setting code (to deal with non-RandR changes) as well as within the RandR extension itself. The second change eliminates the two-call Create/AttachScreen stuff that was done in a failed attempt to create RandR resources before the screen structures were allocated. Merging these back into the Create function is cleaner. (cherry picked from commit 57e87e0d006cbf1f5b175fe02eeb981f741d92f0) Conflicts: randr/randrstr.h randr/rrcrtc.c I think master and server-1.3-branch are more in sync now.
2007-03-23Incorrect extra memory copy in RRChangeOutputProperty.Keith Packard1-2/+0
Left over from previous version of the code, this memmove will break when the mode is not Replace. (cherry picked from commit 945aa0aa556429b50dea8e8ebc0008304b093eb7)
2007-03-23Fix Pending property API, adding RRPostPendingProperty.Keith Packard2-58/+98
Pending Properties take effect when the driver says they do, so provide an API to tell DIX when a property effect is made. Also, allow driver to reject property values in RRChangeOutputProperty. (cherry picked from commit 8eb288fbd69e2ffd02521d2c6a964c8180d08ec8)
2007-03-23Make sure RandR events are delivered from RRCrtcSet.Keith Packard1-43/+50
Some paths were skipping the event delivery stage. (cherry picked from commit 9ca7ba5d6012295a77ed773c656e786440da973d)
2007-03-23Clear allocated RandR screen private structure.Keith Packard1-1/+1
Use xcalloc instead of xalloc when allocating this structure to ensure consistent contents at startup. (cherry picked from commit 16f4c0c1750824f2e5a001cef82a4122a7a2beb0)
2007-03-17Correct ref counting of RRMode structuresKeith Packard2-1/+6
RRModes are referenced by the resource db, RROutput and RRCrtc structures. Ensure that the mode reference count is decremented each time a reference is lost from one of these sources. The missing destroys were in RRCrtcDestroyResource and RROutputDestroyResource, which only happen at server reset time, so modes would be unavailable in subsequent server generations.
2007-03-17Eliminate RRModeRec devPrivate field.Keith Packard1-1/+0
The xf86 mode setting code was mis-using this field to try and store a pointer to a DisplayModeRec, however, each output has its own copy of every DisplayModeRec leaving the one in in the RRModeRec devPrivate field pointing at a random DisplayModeRec. Instead of attempting to rectify this, eliminating the devPrivate entirely turned out to be very easy; the DDX code now accepts an arbitrary RRModeRec structure and set that to the hardware, converting it on the fly to a DisplayModeRec as needed. (cherry picked from commit 3506b9376c2b0db09bfff58d64e07af88a6e8195)
2007-03-17Add support for user-defined modelines in RandR.Keith Packard7-50/+350
The RandR protocol spec has several requests in support of user-defined modes, but the implementation was stubbed out inside the X server. Fill out the DIX portion and start on the xf86 DDX portion. It might be necessary to add more code to the DDX to insert the user-defined modes into the output mode list. (cherry picked from commit 63cc2a51ef87130c632a874672a8c9167f14314e) Conflicts: randr/randrstr.h Updated code to work in master with recent security API changes.
2007-03-15Set the RandR version returned, rather than just passing the proto's version.Eric Anholt1-2/+5
2007-03-05Bugzilla #7145: fix build with gcc 2.95Jens Granseuer3-3/+3
Bugzilla #7145: <http://bugs.freedesktop.org/show_bug.cgi?id=7145> Patch #8987: <http://bugs.freedesktop.org/attachment.cgi?id=8987>
2007-02-28Don't crash setting a NULL mode with a randr classic DDX. Also remember to ↵Aaron Plattner1-0/+9
update the screen size during modesets.
2007-02-28Return BadMatch if a client tries to clone non-cloneable outputs.Aaron Plattner1-0/+21
2007-02-17RRConfigureOutputProperty is a variable length request.Keith Packard1-1/+1
Replace REQUEST_SIZE_MATCH with REQUEST_AT_LEAST_SIZE
2007-02-15Report correct RandR 1.0 sizeID. Report correct subpixel order.Keith Packard1-29/+33
RandR 1.0 sizeID must be computed the same way every time, so when reporting it in the ScreenChangeNotify event, just construct the usual 1.0 data block and use that. subpixel geometry information can be computed by looking at the connected outputs and finding any with subpixel geometry and using one of those for the global screen subpixel geometry. This might be improved by reporting None if more than one screen has information and they conflict.
2007-02-01Fix the size expectations of xRRSetCrtcGamma.Eric Anholt1-1/+1
It was using REQUEST_SIZE_MATCH (client request length must equal request size) rather than REQUEST_AT_LEAST_SIZE (client request length must be at least big enough for request size), and this request has data following the request structure.
2007-01-24Warning fix for RRCrtcSetRotations().Eric Anholt1-0/+1
2007-01-24Make Xinearama screen information reflect CRTC rotation.Keith Packard4-28/+33
2007-01-18Account for CRTC rotation in the cursor containment code.Eric Anholt1-8/+42
2007-01-17Add a setter for randr_crtc->rotations.Eric Anholt2-0/+17
2007-01-16When changing a non-pending property, call the screen rrOutputSetProperty hook.Eric Anholt1-0/+8
2007-01-16Don't forget to add the property we configure to the properties list.Eric Anholt1-0/+6
2007-01-02Track physical screen size and send out updates when that changes.Keith Packard3-1/+10
Events and internal data structures need to be updated whenever the physical or pixel size of the screen changes. The code was ignoring the physical size, so changing only that would not be registered anywhere. (cherry picked from f42e3cea236fa0091ed398a818fc8e17b0e1b3df commit)
2007-01-02Use RRScreenSetSizeRange in 1.0 compat. Check RRGetInfo for error.Keith Packard2-17/+15
The RRScreenSizeSetRange function is used externally for 1.2 API drivers, but can also be used in the 1.0 compatibility code. This also ensures that the right changed bits are set so that clients are correctly notified when the range changes. RRGetInfo can return an error, use that to return BadAlloc to clients instead of blindly going on with various requests. (cherry picked from f05dd384d38c76dd9662933a03625dfef5b1c81f commit)
2006-12-15Convert callers of SecurityLookupWindow() to dixLookupWindow().Eamon Walsh2-27/+20
2006-12-15Convert callers of LookupWindow() to dixLookupWindow().Eamon Walsh1-9/+12
2006-12-15RandR 1.2 rotation code must adjust width/height.Keith Packard2-8/+29
Mode lines reflect the monitor mode, not the projected size into the frame buffer. Flip width/height around so that the dimensions are oriented correctly. (cherry picked from 612a8e61803da8db0e305cbb093696b8e4284572 commit)
2006-12-15RandR 1.0 refresh rates unscrambled. SetScreenConfig uses RRCrtcSet right.Keith Packard1-44/+69
RandR 1.0 refresh rates were scrambled when working with a 1.2 driver that returned sizes in a mixed order. SetScreenConfig was treating RRCrtcSet as returning an RandR status instead of a Bool. (cherry picked from 6dc711833d7387372012fdff1ce1df3aefa2d234 commit)
2006-12-15RandR: config time updates when hardware config changes.Keith Packard5-15/+29
The config time in the RandR protocol reflects when the hardware state has changed. It was getting changed anytime the driver changed the usage of the hardware as well. (cherry picked from 98d18a6578130adb411ca4bcc776fcb7e07f189f commit)
2006-12-15RandR mode list needs both output and crtc modes.Keith Packard1-1/+22
When an output no longer reports the current mode, it must still be included in the list advertised by the X server. Walk the crtcs to ensure it is included. (cherry picked from 78689d0d6630afcbcd3ce5394d12c2564a489f45 commit)
2006-12-14Remove instances of macro SECURITY_VERIFY_DRAWABLE.Eamon Walsh1-3/+4
2006-12-14Naming change: Security*Access -> Dix*AccessEamon Walsh5-19/+19
2006-12-02Destroying RandR crtc or output overwrites memory.Keith Packard2-2/+2
RRCrtcDestroyResource and RROutputDestroyResource had matching bugs that would overwrite memory past the end of the storage of the crtc or output arrays. Oops. (cherry picked from 4202b23ed86405a4cebfdcf239df1b023c1d10ca commit)
2006-12-02RandR ListOutputProperties has nAtoms element, not nPropertiesKeith Packard1-1/+1
Earlier RandR 1.2 encoding revisions used 8-bit nProperties field. Final RandR 1.2 spec uses 16-bit nAtoms field instead. (cherry picked from 66b6358a393972946f16394918db2401c51dc5ed commit)
2006-11-28Ensure RandR resource types are registered before resources are created.Keith Packard3-0/+7
Now that resources can be created during server initialization, make sure the crtc, output and mode resource types are created before attempting to create associated resources. (cherry picked from commit ec83d674167e7045d5317b179c9998e3172a26dc)
2006-11-28Allocate correct size for RRPropertyRec (oops).Keith Packard1-1/+2
Neglected to change the allocation size from sizeof (PropertyRec) to sizeof (RRPropertyRec). Lots of fun crashes this way. (cherry picked from commit 0626eb8e5c9fa05de6bdc9aa0c654f5148bf7cff)
2006-11-28Change RandR property datatype to include pending/valid values.Keith Packard5-124/+384
This patch tracks the protocol changes which introduce more complex semantics for RandR output properties including pending and valid value information. (cherry picked from commit af55c65bea40669fdc038aa34c6a1ec9ecb33e87)
2006-11-16Reduce calls to RRGetInfo.Keith Packard2-8/+5
RRGetInfo can be expensive. Don't invoke it when quering Xinerama information or setting a new CRTC configuration. (cherry picked from commit b5aa9eb8e6eda36856a075f4b008c33f6c706bad)
2006-11-16Remove RandR output options.Keith Packard5-89/+29
RandR output options are now expected to be handled by properties instead. (cherry picked from commit 8b2a7e94a1dc2776ab2cfaaebb309be02502602a)