summaryrefslogtreecommitdiff
path: root/hw/xfree86/modes/xf86Cursors.c
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2008-03-02 20:13:11 -0800
committerAaron Plattner <aplattner@nvidia.com>2008-03-06 14:42:00 -0800
commita8d760f567b19268329c4682495caa591f08a854 (patch)
tree2866f22e1319b4851c48312aaa8b0a827fda97e8 /hw/xfree86/modes/xf86Cursors.c
parentca616b902b2c5d0f046c7a042c11f045479e373a (diff)
Get modes code building with old X servers again.
This change uses XORG_VERSION_CURRENT < 7.0 to mean "server newer than 1.2" since XORG_VERSION current went backwards at some point.
Diffstat (limited to 'hw/xfree86/modes/xf86Cursors.c')
-rw-r--r--hw/xfree86/modes/xf86Cursors.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c
index 5a4d0f6fa..08cf78d82 100644
--- a/hw/xfree86/modes/xf86Cursors.c
+++ b/hw/xfree86/modes/xf86Cursors.c
@@ -226,8 +226,13 @@ xf86_set_cursor_colors (ScrnInfoPtr scrn, int bg, int fg)
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
CursorPtr cursor = xf86_config->cursor;
int c;
- CARD8 *bits = cursor ? dixLookupPrivate(&cursor->devPrivates,
- screen) : NULL;
+ CARD8 *bits = cursor ?
+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0)
+ dixLookupPrivate(&cursor->devPrivates, screen)
+#else
+ cursor->devPriv[screen->myNum]
+#endif
+ : NULL;
/* Save ARGB versions of these colors */
xf86_config->cursor_fg = (CARD32) fg | 0xff000000;
@@ -613,7 +618,12 @@ xf86_reload_cursors (ScreenPtr screen)
else
#endif
(*cursor_info->LoadCursorImage)(cursor_info->pScrn,
- dixLookupPrivate(&cursor->devPrivates, screen));
+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0)
+ dixLookupPrivate(&cursor->devPrivates, screen)
+#else
+ cursor->devPriv[screen->myNum]
+#endif
+ );
(*cursor_info->SetCursorPosition)(cursor_info->pScrn, x, y);
(*cursor_info->ShowCursor)(cursor_info->pScrn);