aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw')
-rw-r--r--xorg-server/hw/xfree86/modes/xf86Cursors.c9
-rw-r--r--xorg-server/hw/xwin/winallpriv.c9
-rw-r--r--xorg-server/hw/xwin/winglobals.c7
3 files changed, 14 insertions, 11 deletions
diff --git a/xorg-server/hw/xfree86/modes/xf86Cursors.c b/xorg-server/hw/xfree86/modes/xf86Cursors.c
index 4cf6147bb..090f29c2f 100644
--- a/xorg-server/hw/xfree86/modes/xf86Cursors.c
+++ b/xorg-server/hw/xfree86/modes/xf86Cursors.c
@@ -325,10 +325,13 @@ xf86_crtc_set_cursor_position (xf86CrtcPtr crtc, int x, int y)
xf86CursorScreenKey);
struct pict_f_vector v;
- v.v[0] = x + ScreenPriv->HotX; v.v[1] = y + ScreenPriv->HotY; v.v[2] = 1;
+ v.v[0] = (x + ScreenPriv->HotX) + 0.5;
+ v.v[1] = (y + ScreenPriv->HotY) + 0.5;
+ v.v[2] = 1;
pixman_f_transform_point (&crtc->f_framebuffer_to_crtc, &v);
- x = floor (v.v[0] + 0.5);
- y = floor (v.v[1] + 0.5);
+ /* cursor will have 0.5 added to it already so floor is sufficent */
+ x = floor (v.v[0]);
+ y = floor (v.v[1]);
/*
* Transform position of cursor upper left corner
*/
diff --git a/xorg-server/hw/xwin/winallpriv.c b/xorg-server/hw/xwin/winallpriv.c
index 6a6dc60db..f4078207e 100644
--- a/xorg-server/hw/xwin/winallpriv.c
+++ b/xorg-server/hw/xwin/winallpriv.c
@@ -72,7 +72,7 @@ winAllocatePrivates (ScreenPtr pScreen)
/* Intialize private structure members */
pScreenPriv->fActive = TRUE;
- /* Reserve screen memory for our privates */
+ /* Register our screen private */
if (!dixRegisterPrivateKey(g_iScreenPrivateKey, PRIVATE_SCREEN, 0))
{
ErrorF ("winAllocatePrivates - dixRegisterPrivateKey () failed\n");
@@ -162,6 +162,13 @@ winAllocateCmapPrivates (ColormapPtr pCmap)
/* Initialize the memory of the private structure */
ZeroMemory (pCmapPriv, sizeof (winPrivCmapRec));
+ /* Register our colourmap private */
+ if (!dixRegisterPrivateKey(g_iCmapPrivateKey, PRIVATE_COLORMAP, 0))
+ {
+ ErrorF ("winAllocateCmapPrivates - AllocateCmapPrivate () failed\n");
+ return FALSE;
+ }
+
/* Save the cmap private pointer */
winSetCmapPriv (pCmap, pCmapPriv);
diff --git a/xorg-server/hw/xwin/winglobals.c b/xorg-server/hw/xwin/winglobals.c
index b698270b7..80a6c9feb 100644
--- a/xorg-server/hw/xwin/winglobals.c
+++ b/xorg-server/hw/xwin/winglobals.c
@@ -126,13 +126,6 @@ Atom g_atomLastOwnedSelection = None;
void
winInitializeGlobals (void)
{
- if (!dixRegisterPrivateKey(&g_iScreenPrivateKeyRec, PRIVATE_SCREEN, 0) ||
- !dixRegisterPrivateKey(&g_iCmapPrivateKeyRec, PRIVATE_COLORMAP, 0) ||
- !dixRegisterPrivateKey(&g_iGCPrivateKeyRec, PRIVATE_GC, 0) ||
- !dixRegisterPrivateKey(&g_iPixmapPrivateKeyRec, PRIVATE_PIXMAP, 0) ||
- !dixRegisterPrivateKey(&g_iWindowPrivateKeyRec, PRIVATE_WINDOW, 0)) {
- FatalError("cannot register private key");
- }
g_dwCurrentThreadID = GetCurrentThreadId ();
g_hwndKeyboardFocus = NULL;
#ifdef XWIN_CLIPBOARD