diff options
author | Keith Packard <keithp@guitar.keithp.com> | 2007-02-18 23:49:38 -0800 |
---|---|---|
committer | Keith Packard <keithp@neko.keithp.com> | 2007-03-17 23:20:07 -0700 |
commit | 2c93083edd29a65e73bb2e8eff9d353e92845c9b (patch) | |
tree | 596e34a8f006c18bf9984e87303dac546a048e5c /randr/rrcrtc.c | |
parent | 3bffb281260476d2f74f0bf451d85d2f7cacd6c4 (diff) |
Add support for user-defined modelines in RandR.
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.
Diffstat (limited to 'randr/rrcrtc.c')
-rw-r--r-- | randr/rrcrtc.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c index db506f4b0..315dd6c08 100644 --- a/randr/rrcrtc.c +++ b/randr/rrcrtc.c @@ -666,10 +666,15 @@ ProcRRSetCrtcConfig (ClientPtr client) return BadMatch; } /* validate mode for this output */ - for (j = 0; j < outputs[i]->numModes; j++) - if (outputs[i]->modes[j] == mode) + for (j = 0; j < outputs[i]->numModes + outputs[i]->numUserModes; j++) + { + RRModePtr m = (j < outputs[i]->numModes ? + outputs[i]->modes[j] : + outputs[i]->userModes[j - outputs[i]->numModes]); + if (m == mode) break; - if (j == outputs[i]->numModes) + } + if (j == outputs[i]->numModes + outputs[i]->numUserModes) { if (outputs) xfree (outputs); |