Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:fmherschel
fhxorg
xf86-video-i810-setcursorposition.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File xf86-video-i810-setcursorposition.diff of Package fhxorg
commit 5ac927d6f05ba6f9608d7e758cbac66e8b3a9db1 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Tue Oct 17 13:27:40 2006 +0200 Don't crash if SetCursorPosition is called with pScrn->currentMode == NULL. This allows the driver to work with servers that don't have the fix for this that was only recently pushed to git. diff --git a/src/i830_cursor.c b/src/i830_cursor.c index c5c904c..8343b6b 100644 --- a/src/i830_cursor.c +++ b/src/i830_cursor.c @@ -520,11 +520,17 @@ I830SetCursorPosition(ScrnInfoPtr pScrn, x -= pScrn->frameX0; y -= pScrn->frameY0; - /* Clamp the cursor position to the visible screen area */ - if (x >= pScrn->currentMode->HDisplay) x = pScrn->currentMode->HDisplay - 1; - if (y >= pScrn->currentMode->VDisplay) y = pScrn->currentMode->VDisplay - 1; - if (x <= -I810_CURSOR_X) x = -I810_CURSOR_X + 1; - if (y <= -I810_CURSOR_Y) y = -I810_CURSOR_Y + 1; + if (pScrn->currentMode) { + /* Clamp the cursor position to the visible screen area */ + if (x >= pScrn->currentMode->HDisplay) x = pScrn->currentMode->HDisplay - 1; + if (y >= pScrn->currentMode->VDisplay) y = pScrn->currentMode->VDisplay - 1; + if (x <= -I810_CURSOR_X) x = -I810_CURSOR_X + 1; + if (y <= -I810_CURSOR_Y) y = -I810_CURSOR_Y + 1; + } else { + /* Can't ensure the cursor will be visible, so hide it */ + hide = TRUE; + show = FALSE; + } #if 0 /*
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor