diff options
author | Keith Packard <keithp@keithp.com> | 2010-12-04 19:22:11 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-12-06 20:08:43 -0800 |
commit | d94a035ea9eb3167fc4f35b2d9f0d53f8807014c (patch) | |
tree | 2fb8a7dd45aab259a5570a17155cd5bc9d69d850 /randr/rrscreen.c | |
parent | 66294afcab7b7a82f7dd897767e46c48a94b8ee8 (diff) |
randr: Implement RRSetCrtcConfigs
This provides a driver-independent implementation of the
RRSetCrtcConfigs API by simply using the existing interfaces.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Diffstat (limited to 'randr/rrscreen.c')
-rw-r--r-- | randr/rrscreen.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/randr/rrscreen.c b/randr/rrscreen.c index f58e6578a..62ea2b62f 100644 --- a/randr/rrscreen.c +++ b/randr/rrscreen.c @@ -191,6 +191,24 @@ RRScreenSizeSet (ScreenPtr pScreen, } /* + * Compute an RRScreenConfig from the current screen information + */ +void +RRScreenCurrentConfig(ScreenPtr screen, + RRScreenConfigPtr screen_config) +{ + PixmapPtr screen_pixmap = screen->GetScreenPixmap(screen); + WindowPtr root = screen->root; + + screen_config->screen_pixmap_width = screen_pixmap->drawable.width; + screen_config->screen_pixmap_height = screen_pixmap->drawable.height; + screen_config->screen_width = root->drawable.width; + screen_config->screen_height = root->drawable.height; + screen_config->mm_width = screen->mmWidth; + screen_config->mm_height = screen->mmHeight; +} + +/* * Retrieve valid screen size range */ int |