Skip to content

Commit

Permalink
Split RandR implementation into separate files.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Keith Packard committed Nov 16, 2006
1 parent d7f1f28 commit cbb5875
Show file tree
Hide file tree
Showing 8 changed files with 852 additions and 437 deletions.
6 changes: 5 additions & 1 deletion randr/Makefile.am
Expand Up @@ -9,4 +9,8 @@ endif
librandr_la_SOURCES = \
mirandr.c \
randr.c \
randrstr.h
randrstr.h \
rrcrtc.c \
rrmode.c \
rroutput.c \
rrscreen.c
7 changes: 5 additions & 2 deletions randr/mirandr.c
Expand Up @@ -70,16 +70,19 @@ Bool
miRandRInit (ScreenPtr pScreen)
{
rrScrPrivPtr pScrPriv;
#if RANDR_12_INTERFACE
RRModePtr mode;
RRCrtcPtr crtc;
RROutputPtr output;
xRRModeInfo modeInfo;
char name[64];
#endif

if (!RRScreenInit (pScreen))
return FALSE;
pScrPriv = rrGetScrPriv(pScreen);
pScrPriv->rrGetInfo = miRRGetInfo;
#if RANDR_12_INTERFACE
pScrPriv->rrCrtcSet = miRRCrtcSet;

RRScreenSetSizeRange (pScreen,
Expand Down Expand Up @@ -111,7 +114,7 @@ miRandRInit (ScreenPtr pScreen)
&crtc, 1, /* crtcs */
RR_Connected))
return FALSE;
if (!RRCrtcSet (crtc, mode, 0, 0, RR_Rotate_0, 1, &output))
return FALSE;
RRCrtcNotify (crtc, mode, 0, 0, RR_Rotate_0, 1, &output);
#endif
return TRUE;
}

0 comments on commit cbb5875

Please sign in to comment.