Commit Graph

80 Commits

Author SHA1 Message Date
Peter Hutterer
1f0075786f Merge branch 'master' into mpx
Conflicts:

	configure.ac
	dix/getevents.c
	hw/xfree86/ramdac/xf86Cursor.c
	mi/mipointer.c
	xkb/xkbUtils.c
2007-03-05 12:37:17 +10:30
Aaron Plattner
06c3021aec Don't crash setting a NULL mode with a randr classic DDX. Also remember to update the screen size during modesets. 2007-02-28 16:13:13 -08:00
Aaron Plattner
8b24575884 Return BadMatch if a client tries to clone non-cloneable outputs. 2007-02-28 12:35:50 -08:00
Keith Packard
8606aeb9b2 RRConfigureOutputProperty is a variable length request.
Replace REQUEST_SIZE_MATCH with REQUEST_AT_LEAST_SIZE
2007-02-17 15:16:11 -08:00
Keith Packard
258beebc77 Report correct RandR 1.0 sizeID. Report correct subpixel order.
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-15 20:37:44 -08:00
Eric Anholt
4f2f3233c8 Fix the size expectations of xRRSetCrtcGamma.
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-02-01 15:10:29 -08:00
Peter Hutterer
15a81b6325 Merge branch 'master' 2007-01-28 17:18:57 +10:30
Eric Anholt
a53586eebc Warning fix for RRCrtcSetRotations(). 2007-01-24 13:36:25 -08:00
Keith Packard
b6b8559321 Make Xinearama screen information reflect CRTC rotation. 2007-01-24 13:34:58 -08:00
Eric Anholt
a811e92104 Account for CRTC rotation in the cursor containment code. 2007-01-18 14:28:41 -08:00
Eric Anholt
42a48786ac Add a setter for randr_crtc->rotations. 2007-01-17 14:34:42 -08:00
Eric Anholt
cde17015df When changing a non-pending property, call the screen rrOutputSetProperty hook. 2007-01-16 13:01:45 -08:00
Eric Anholt
e3add7c8ec Don't forget to add the property we configure to the properties list. 2007-01-16 13:01:44 -08:00
Keith Packard
953a9ef949 Track physical screen size and send out updates when that changes.
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 f42e3cea23 commit)
2007-01-02 09:18:50 +11:00
Keith Packard
e79602fca2 Use RRScreenSetSizeRange in 1.0 compat. Check RRGetInfo for error.
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 f05dd384d3 commit)
2007-01-02 09:13:39 +11:00
Peter Hutterer
2d0a63126b Merge branch 'master' of git://anongit.freedesktop.org/git/xorg/xserver 2006-12-19 10:31:40 +10:30
Eamon Walsh
25d5e0a629 Convert callers of SecurityLookupWindow() to dixLookupWindow(). 2006-12-15 15:50:46 -05:00
Eamon Walsh
04c721854f Convert callers of LookupWindow() to dixLookupWindow(). 2006-12-15 14:19:54 -05:00
Keith Packard
670bbb8731 RandR 1.2 rotation code must adjust width/height.
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 612a8e6180 commit)
2006-12-15 18:32:32 +11:00
Keith Packard
6c6901434a RandR 1.0 refresh rates unscrambled. SetScreenConfig uses RRCrtcSet right.
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 6dc711833d commit)
2006-12-15 18:32:25 +11:00
Keith Packard
628c7daeb1 RandR: config time updates when hardware config changes.
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 98d18a6578 commit)
2006-12-15 18:32:18 +11:00
Keith Packard
d742025f43 RandR mode list needs both output and crtc modes.
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 78689d0d66 commit)
2006-12-15 18:32:10 +11:00
Eamon Walsh
51b69ff499 Remove instances of macro SECURITY_VERIFY_DRAWABLE. 2006-12-14 17:53:43 -05:00
Eamon Walsh
6c46645cfc Naming change: Security*Access -> Dix*Access 2006-12-14 14:45:42 -05:00
Peter Hutterer
eb1d9f51af Ironing some glitches caused by the merge 2006-12-05 18:50:19 +10:30
Keith Packard
89b2aa9be8 Destroying RandR crtc or output overwrites memory.
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 4202b23ed8 commit)
2006-12-02 10:46:30 +11:00
Keith Packard
23ba72323a RandR ListOutputProperties has nAtoms element, not nProperties
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 66b6358a39 commit)
2006-12-02 10:44:06 +11:00
Keith Packard
b0c8558b9d Ensure RandR resource types are registered before resources are created.
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 ec83d67416)
2006-11-28 11:13:43 -08:00
Keith Packard
6245e9dd47 Allocate correct size for RRPropertyRec (oops).
Neglected to change the allocation size from sizeof (PropertyRec) to
sizeof (RRPropertyRec). Lots of fun crashes this way.
(cherry picked from commit 0626eb8e5c)
2006-11-28 11:13:43 -08:00
Keith Packard
24abce8032 Change RandR property datatype to include pending/valid values.
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 af55c65bea)
2006-11-28 11:13:43 -08:00
Keith Packard
ef47d9c3ba Reduce calls to RRGetInfo.
RRGetInfo can be expensive. Don't invoke it when quering Xinerama
information or setting a new CRTC configuration.
(cherry picked from commit b5aa9eb8e6)
2006-11-16 17:39:26 -08:00
Keith Packard
07b26e690c Remove RandR output options.
RandR output options are now expected to be handled by properties instead.
(cherry picked from commit 8b2a7e94a1)
2006-11-16 17:39:21 -08:00
Keith Packard
0dee48b8af Add RRInit function to create resource types for RR objects.
To allow RandR objects to be created before the screen object exists,
the resource types must be registered with the resource database.
A driver wishing to create RandR objects must call RRInit before doing so.

Also, fix a segfault when setting Output data before it is associated with a
screen.
2006-11-08 23:17:55 -08:00
Keith Packard
ec77a95a02 Allow RandR objects to be created before the associated ScreenRec.
xf86 drivers need to create RandR object in the PreInit stage,
before the ScreenRec is allocated. Changing the RandR DIX code
to permit this required the addition of functions that later associate the
objects with the related screen.

An additional change is that modes are now global, and no longer associated
with a specific screen. This change actually makes mode management cleaner
as there is no more per-screen list of modes to deal with.

This changes the RandR 1.2 ABI/API for drivers.
2006-11-08 21:36:35 -08:00
Eric Anholt
cde8806c29 Don't bump the refcnt if the new mode is NULL. 2006-11-03 16:36:34 -08:00
Keith Packard
4056e6e79a Move physical size from mode to output.
Modes can be shared across different sized monitors this way.

Also caught some missing byteswapping and an incorrect return type.
2006-11-01 00:29:46 -08:00
Keith Packard
e21604914d Merge master back in and clean up some unfinished code (closes 8745) 2006-10-25 09:48:23 -07:00
Keith Packard
59511974db Merge branch 'master' into randr-1.2 2006-10-24 17:26:20 -07:00
Keith Packard
828c34e83c Byte swap RRSelectInput enable flags. 2006-10-24 17:23:02 -07:00
Keith Packard
054f8cd267 Limit pointer to valid crtc areas. Add event swapping. Fix change tracking.
Add function to keep pointer within valid crtc areas.
Finish event delivery and swapping code.
Separate configuration from layout changes to send correct events.
2006-10-13 17:34:53 -07:00
Keith Packard
1178796a4d Add preferred modes for each output. Round vrefresh. Deliver crtc events. 2006-10-05 22:31:35 -07:00
Keith Packard
c4f30c6353 Add mode origins and output options. Fix memmoves in resource free funcs.
Output options and mode origins both affected driver ABI.  memmove mistakes
were causing 'Freeing resource which isn't there' messages.

Prune unused non-user defined modes from available list now.
2006-10-03 21:06:11 -07:00
Keith Packard
b36fde9257 When no mode is specified, don't validate mode-specific parameters. 2006-09-21 09:52:04 -07:00
Keith Packard
219546fd76 Steal Xinerama code from SiS driver. Add missing files.
Provide a Xinerama implementation when DIX version isn't enabled. This
version exposes each crtc as a separate 'screen' and reports the size of
that patch. The extension also sends ConfigureNotify events to the root
window whenever crtcs change so that applications will re-fetch xinerama
information. This actually works for metacity.
2006-09-20 22:43:05 -07:00
Keith Packard
bde0a4c12c RRSetCrtcConfig status fix. RRGetScreenResources timestamp fix.
RRSetCrtcConfig was returning the wrong status values.
RRGetScreenResources was always returning currentTime.
2006-09-20 19:42:34 -07:00
Keith Packard
09f7499851 typo 2006-09-20 13:15:20 -07:00
Keith Packard
9f870e0aa1 When setting output state, leave output unchanged when setting to current. 2006-09-20 13:14:53 -07:00
Keith Packard
d08718d8fd Avoid calling xalloc(0). Change rrScreenSizeSet to rrScreenSetSize. 2006-09-20 12:05:52 -07:00
Keith Packard
ef1f3248cb Split out 1.0-style info and new property routines to their own files. 2006-09-19 22:48:54 -07:00
Keith Packard
07112adb08 RRGetScreenResources and RRGetOutputInfo are working now.
Removed separate id field in RRModeRec.
Pull screen subpixel order from Render extension.
Implement RGetScreenResources and RRGetOutputInfo
2006-09-19 00:46:27 -07:00