xserver: Branch 'server-1.3-branch'
Keith Packard
keithp at kemper.freedesktop.org
Thu Mar 15 19:52:20 EET 2007
hw/xfree86/modes/xf86Cursors.c | 20 ++++++++++++++++----
1 files changed, 16 insertions(+), 4 deletions(-)
New commits:
diff-tree 5b77bf2d020b1ee56c1c5f2db089a8f7f64a76a6 (from 4d81c99a4660a0bf9014f789de55edabd185bd14)
Author: Keith Packard <keithp at neko.keithp.com>
Date: Thu Mar 15 10:50:45 2007 -0700
Allow xf86_reload_cursors during server init.
xf86_reload_cursors is supposed to be called from the crtc mode setting
commit hook; as that happens during server initialization, check for this
case.
diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c
index 095df48..009cccf 100644
--- a/hw/xfree86/modes/xf86Cursors.c
+++ b/hw/xfree86/modes/xf86Cursors.c
@@ -548,12 +548,24 @@ xf86_cursors_init (ScreenPtr screen, int
void
xf86_reload_cursors (ScreenPtr screen)
{
- ScrnInfoPtr scrn = xf86Screens[screen->myNum];
- xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
- xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
- CursorPtr cursor = xf86_config->cursor;
+ ScrnInfoPtr scrn;
+ xf86CrtcConfigPtr xf86_config;
+ xf86CursorInfoPtr cursor_info;
+ CursorPtr cursor;
int x, y;
+ /* initial mode setting will not have set a screen yet */
+ if (!screen)
+ return;
+ scrn = xf86Screens[screen->myNum];
+ xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
+
+ /* make sure the cursor code has been initialized */
+ cursor_info = xf86_config->cursor_info;
+ if (!cursor_info)
+ return;
+
+ cursor = xf86_config->cursor;
GetSpritePosition (&x, &y);
if (!(cursor_info->Flags & HARDWARE_CURSOR_UPDATE_UNHIDDEN))
(*cursor_info->HideCursor)(scrn);
More information about the xorg-commit
mailing list