Commit Graph

65 Commits

Author SHA1 Message Date
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
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
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
Keith Packard
afe5e9483b RandR working with old clients and old API. 2006-09-18 12:18:22 -07:00
Keith Packard
bf07893947 Split out RandR dispatch code from randr.c to rr*dispatch.c.
More disassembly to ease ongoing development.
2006-09-17 23:08:12 -07:00
Keith Packard
3e745745fe Split RandR implementation into separate files.
RandR is getting too big to live in one file; split into one file per object
type (crtc, mode, screen), leaving the rest of the code in randr.c.

Code is slowly approaching the point where it will drop-in as a replacement
for the old 1.0 implementation.
2006-09-17 23:08:12 -07:00
Keith Packard
d17fb9672e Start moving to new randr 1.2 definition 2006-09-17 23:08:12 -07:00
Keith Packard
8dec74321d Successful legacy RandR API/Protocol emulation for query.
These changes clean up minor errors to make it possible to list the
available modes for a monitor using legacy APIs in both the X server DDX and
RandR protocol. Setting modes is untested, so it probably doesn't work.
2006-09-17 23:08:11 -07:00
Keith Packard
cab3a0145f RandR: New data structure, old API. At least it compiles now 2006-09-17 23:08:11 -07:00
Keith Packard
d95c758630 Preliminary RandR 1.2 work 2006-09-17 23:08:11 -07:00
Adam Jackson
0aaac95b0d Remove RCS tags. Fix Xprint makefile braindamage. 2006-07-21 17:56:00 -04:00
Daniel Stone
84683f19b4 get rid of XFree86LOADER, XFree86Server, XFree86Module, and IN_MODULE
Get rid of almost all uses of these definitions.  They're still defined for
delinquent out-of-tree drivers, and also for the Mesa build.  As well as
for miinitext.c.  But largely gone.
2006-07-18 18:17:38 -04:00
Donnie Berkholz
0f065059dc Wrap a couple more SDK headers in if XORG, as per Dave Airlie's commit on
2006-01-18.
2006-04-17 07:27:43 +00:00
Eric Anholt
c3d1403672 Remove libcwrapper usage from xorg server modules. The libcwrapper is only
of (marginal) use in the drivers, and that usage remains.
2006-02-10 22:00:30 +00:00
Alan Hourihane
2ab487d4d2 Add a new function RRGetRotation() which does exactly the same thing as
xf86GetRotation(), but allows for drivers to provide their own RandR
    implementation. xf86GetRotation could be obsoleted by this change.
2006-02-01 22:20:05 +00:00
Alan Hourihane
af5b3ea4b3 add randrstr.h to sdk_HEADERS 2006-01-19 14:51:09 +00:00
Kevin E Martin
7c00afd0ec Define XFree86Server only where it is required. 2005-12-02 06:02:45 +00:00
Kevin E Martin
da5d66f2ff Fix usage of XFree86LOADER/XFree86Module/IN_MODULE and update loadable
module builds to reflect this change.
2005-11-29 16:39:33 +00:00