[PATCH] dixSetPrivate regressions in DDX xwin

Colin Harrison colin.harrison at virgin.net
Mon Jun 7 03:40:56 PDT 2010


Hi,

Patches for a few typos and a regression in DDX xwin...

--- ./hw/xwin/save_winallpriv.c 2010-06-06 06:02:02.000000000 +0100
+++ ./hw/xwin/winallpriv.c      2010-06-06 17:45:40.000000000 +0100
@@ -74,25 +74,31 @@
   /* Intialize private structure members */
   pScreenPriv->fActive = TRUE;

+  if (!dixRegisterPrivateKey(g_iScreenPrivateKey, PRIVATE_SCREEN, 0))
+    {
+      ErrorF ("winAllocatePrivates - AllocateScreenPrivate () failed\n");
+      return FALSE;
+    }
+
   /* Save the screen private pointer */
   winSetScreenPriv (pScreen, pScreenPriv);

   /* Reserve GC memory for our privates */
-  if (!dixRequestPrivateKey(g_iGCPrivateKey, PRIVATE_GC, sizeof
(winPrivGCRec)))
+  if (!dixRegisterPrivateKey(g_iGCPrivateKey, PRIVATE_GC, sizeof
(winPrivGCRec)))
     {
       ErrorF ("winAllocatePrivates - AllocateGCPrivate () failed\n");
       return FALSE;
     }

   /* Reserve Pixmap memory for our privates */
-  if (!dixRequestPrivateKey(g_iPixmapPrivateKey, PRIVATE_PIXMAP, sizeof
(winPrivPixmapRec)))
+  if (!dixRegisterPrivateKey(g_iPixmapPrivateKey, PRIVATE_PIXMAP, sizeof
(winPrivPixmapRec)))
     {
       ErrorF ("winAllocatePrivates - AllocatePixmapPrivates () failed\n");
       return FALSE;
     }

   /* Reserve Window memory for our privates */
-  if (!dixRequestPrivateKey(g_iWindowPrivateKey, PRIVATE_WINDOW, sizeof
(winPrivWinRec)))
+  if (!dixRegisterPrivateKey(g_iWindowPrivateKey, PRIVATE_WINDOW, sizeof
(winPrivWinRec)))
     {
       ErrorF ("winAllocatePrivates () - AllocateWindowPrivates ()
failed\n");
        return FALSE;


--- ./hw/xwin/save_win.h        2010-06-06 06:02:02.000000000 +0100
+++ ./hw/xwin/win.h     2010-06-06 07:15:38.000000000 +0100
@@ -631,7 +631,7 @@
 extern DevPrivateKeyRec                g_iScreenPrivateKeyRec;
 #define g_iScreenPrivateKey    (&g_iScreenPrivateKeyRec)
 extern DevPrivateKeyRec                g_iCmapPrivateKeyRec;
-#define g_iCmapPrivateKeyRec   (&g_iCmapPrivateKeyRec)
+#define g_iCmapPrivateKey      (&g_iCmapPrivateKeyRec)
 extern DevPrivateKeyRec                g_iGCPrivateKeyRec;
 #define g_iGCPrivateKey        (&g_iGCPrivateKeyRec)
 extern DevPrivateKeyRec                g_iPixmapPrivateKeyRec;

Thanks,
Colin Harrison



More information about the xorg-devel mailing list