xserver: Branch 'master' - 5 commits

Peter Hutterer whot at kemper.freedesktop.org
Sun Jun 8 06:59:46 PDT 2008


 hw/kdrive/ephyr/ephyrinit.c |   22 +++++++++++-----------
 hw/xnest/Cursor.c           |    8 ++++----
 hw/xnest/Events.c           |   14 ++++++++------
 hw/xnest/Init.c             |    7 ++-----
 hw/xnest/Screen.c           |    5 +++--
 hw/xnest/XNCursor.h         |   21 ++++++++++++++++-----
 mi/midispcur.c              |    6 ------
 7 files changed, 44 insertions(+), 39 deletions(-)

New commits:
commit 2854abd39d4deb79c9ee9bcc931fad969392cfc5
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date:   Sun Jun 8 23:20:11 2008 +0930

    xnest: fix up sprite funcs to stop compiler warnings.

diff --git a/hw/xnest/Cursor.c b/hw/xnest/Cursor.c
index 1386980..3e676d1 100644
--- a/hw/xnest/Cursor.c
+++ b/hw/xnest/Cursor.c
@@ -36,7 +36,7 @@ is" without express or implied warranty.
 #include "Args.h"
 
 Bool
-xnestRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
+xnestRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
 {
   XImage *ximage;
   Pixmap source, mask;
@@ -116,7 +116,7 @@ xnestRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
 }
 
 Bool
-xnestUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
+xnestUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
 {
   XFreeCursor(xnestDisplay, xnestCursor(pCursor, pScreen));
   xfree(xnestGetCursorPriv(pCursor, pScreen));
@@ -141,7 +141,7 @@ xnestRecolorCursor(ScreenPtr pScreen, CursorPtr pCursor, Bool displayed)
 		 &fg_color, &bg_color);
 }
 
-void xnestSetCursor (ScreenPtr pScreen, CursorPtr pCursor, int x, int y)
+void xnestSetCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y)
 {
     if (pCursor)
     {
@@ -152,6 +152,6 @@ void xnestSetCursor (ScreenPtr pScreen, CursorPtr pCursor, int x, int y)
 }
 
 void
-xnestMoveCursor (ScreenPtr pScreen, int x, int y)
+xnestMoveCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
 {
 }
diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c
index 11c180b..9d157a3 100644
--- a/hw/xnest/Screen.c
+++ b/hw/xnest/Screen.c
@@ -124,6 +124,8 @@ static miPointerSpriteFuncRec xnestPointerSpriteFuncs =
     xnestUnrealizeCursor,
     xnestSetCursor,
     xnestMoveCursor,
+    NULL,
+    NULL
 };
 
 Bool
diff --git a/hw/xnest/XNCursor.h b/hw/xnest/XNCursor.h
index 9705f6b..627be03 100644
--- a/hw/xnest/XNCursor.h
+++ b/hw/xnest/XNCursor.h
@@ -28,10 +28,21 @@ typedef struct {
 #define xnestCursor(pCursor, pScreen) \
   (xnestGetCursorPriv(pCursor, pScreen)->cursor)
 
-Bool xnestRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor);
-Bool xnestUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor);
-void xnestRecolorCursor(ScreenPtr pScreen, CursorPtr pCursor, Bool displayed);
-void xnestSetCursor (ScreenPtr pScreen, CursorPtr pCursor, int x, int y);
-void xnestMoveCursor (ScreenPtr pScreen, int x, int y);
+Bool xnestRealizeCursor(DeviceIntPtr pDev,
+                        ScreenPtr pScreen,
+                        CursorPtr pCursor);
+Bool xnestUnrealizeCursor(DeviceIntPtr pDev,
+                          ScreenPtr pScreen,
+                          CursorPtr pCursor);
+void xnestRecolorCursor(ScreenPtr pScreen,
+                        CursorPtr pCursor,
+                        Bool displayed);
+void xnestSetCursor (DeviceIntPtr pDev,
+                     ScreenPtr pScreen,
+                     CursorPtr pCursor,
+                     int x, int y);
+void xnestMoveCursor (DeviceIntPtr pDev,
+                      ScreenPtr pScreen,
+                      int x, int y);
 
 #endif /* XNESTCURSOR_H */
commit c68ca0c7b2c72df0501d26bf7f640029ff2d9568
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date:   Sun Jun 8 23:14:20 2008 +0930

    xnest: switch to using EventList rather than xEvents.

diff --git a/hw/xnest/Events.c b/hw/xnest/Events.c
index f7a551c..355b46f 100644
--- a/hw/xnest/Events.c
+++ b/hw/xnest/Events.c
@@ -43,7 +43,7 @@ is" without express or implied warranty.
 
 CARD32 lastEventTime = 0;
 
-extern xEvent *xnestEvents;
+extern EventList *xnestEvents;
 
 void
 ProcessInputEvents()
@@ -106,10 +106,11 @@ xnestQueueKeyEvent(int type, unsigned int keycode)
 {
   int i, n;
 
+  GetEventList(&xnestEvents);
   lastEventTime = GetTimeInMillis();
   n = GetKeyboardEvents(xnestEvents, xnestKeyboardDevice, type, keycode);
   for (i = 0; i < n; i++)
-    mieqEnqueue(xnestKeyboardDevice, xnestEvents + i);
+    mieqEnqueue(xnestKeyboardDevice, (xnestEvents + i)->event);
 }
 
 void
@@ -119,6 +120,7 @@ xnestCollectEvents(void)
   xEvent x;
   int i, n, valuators[2];
   ScreenPtr pScreen;
+  GetEventList(&xnestEvents);
 
   while (XCheckIfEvent(xnestDisplay, &X, xnestNotExposurePredicate, NULL)) {
     switch (X.type) {
@@ -138,7 +140,7 @@ xnestCollectEvents(void)
       n = GetPointerEvents(xnestEvents, xnestPointerDevice, ButtonPress,
                            X.xbutton.button, POINTER_RELATIVE, 0, 0, NULL);
       for (i = 0; i < n; i++)
-        mieqEnqueue(xnestPointerDevice, xnestEvents + i);
+        mieqEnqueue(xnestPointerDevice, (xnestEvents + i)->event);
       break;
       
     case ButtonRelease:
@@ -147,7 +149,7 @@ xnestCollectEvents(void)
       n = GetPointerEvents(xnestEvents, xnestPointerDevice, ButtonRelease,
                            X.xbutton.button, POINTER_RELATIVE, 0, 0, NULL);
       for (i = 0; i < n; i++)
-        mieqEnqueue(xnestPointerDevice, xnestEvents + i);
+        mieqEnqueue(xnestPointerDevice, (xnestEvents + i)->event);
       break;
       
     case MotionNotify:
@@ -157,7 +159,7 @@ xnestCollectEvents(void)
       n = GetPointerEvents(xnestEvents, xnestPointerDevice, MotionNotify,
                            0, POINTER_ABSOLUTE, 0, 2, valuators);
       for (i = 0; i < n; i++)
-        mieqEnqueue(xnestPointerDevice, xnestEvents + i);
+        mieqEnqueue(xnestPointerDevice, (xnestEvents + i)->event);
       break;
       
     case FocusIn:
@@ -190,7 +192,7 @@ xnestCollectEvents(void)
           n = GetPointerEvents(xnestEvents, xnestPointerDevice, MotionNotify,
                                0, POINTER_ABSOLUTE, 0, 2, valuators);
           for (i = 0; i < n; i++)
-            mieqEnqueue(xnestPointerDevice, xnestEvents + i);
+            mieqEnqueue(xnestPointerDevice, (xnestEvents + i)->event);
 	  xnestDirectInstallColormaps(pScreen);
 	}
       }
diff --git a/hw/xnest/Init.c b/hw/xnest/Init.c
index de80cb5..f52445c 100644
--- a/hw/xnest/Init.c
+++ b/hw/xnest/Init.c
@@ -45,7 +45,7 @@ is" without express or implied warranty.
 
 Bool xnestDoFullGeneration = True;
 
-xEvent *xnestEvents = NULL;
+EventList *xnestEvents = NULL;
 
 void
 InitOutput(ScreenInfo *screenInfo, int argc, char *argv[])
@@ -92,10 +92,7 @@ InitInput(int argc, char *argv[])
   xnestPointerDevice = AddInputDevice(serverClient, xnestPointerProc, TRUE);
   xnestKeyboardDevice = AddInputDevice(serverClient, xnestKeyboardProc, TRUE);
 
-  if (!xnestEvents)
-      xnestEvents = (xEvent *) xcalloc(sizeof(xEvent), GetMaximumEventsNum());
-  if (!xnestEvents)
-      FatalError("couldn't allocate room for events\n");
+  GetEventList(&xnestEvents);
 
   RegisterPointerDevice(xnestPointerDevice);
   RegisterKeyboardDevice(xnestKeyboardDevice);
commit 34429d16d319ef2709c22a5c22f45d0e82c78b20
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date:   Sun Jun 8 23:08:34 2008 +0930

    xnest: call miDCInitialize rather than miPointerInitialize.
    
    This unfortunately gives us a lots of artefacts, so cursor rendering cannot be
    assumed complete. But it's better than crashing.

diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c
index 61a325f..11c180b 100644
--- a/hw/xnest/Screen.c
+++ b/hw/xnest/Screen.c
@@ -305,8 +305,7 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[])
   pScreen->blockData = NULL;
   pScreen->wakeupData = NULL;
 
-  miPointerInitialize (pScreen, &xnestPointerSpriteFuncs, 
-		       &xnestPointerCursorFuncs, True);
+  miDCInitialize (pScreen, &xnestPointerCursorFuncs);
 
   pScreen->mmWidth = xnestWidth * DisplayWidthMM(xnestDisplay, 
 		       DefaultScreen(xnestDisplay)) / 
commit a7d4bec884c24c0e1792fd7d6677cdd0a69978e3
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date:   Sun Jun 8 23:03:20 2008 +0930

    mi: remove leftover old license comment.

diff --git a/mi/midispcur.c b/mi/midispcur.c
index d68050f..8755277 100644
--- a/mi/midispcur.c
+++ b/mi/midispcur.c
@@ -29,12 +29,6 @@ Except as contained in this notice, the name of The Open Group shall not be
 used in advertising or otherwise to promote the sale, use or other dealings
 in this Software without prior written authorization from The Open Group.
 */
-/* 
- * MPX additions:
- * Copyright © 2006 Peter Hutterer
- * Author: Peter Hutterer <peter at cs.unisa.edu.au>
- *
- */
 
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
commit 585125685b5f09245021c8ee15f57950fe6cdd20
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date:   Sun Jun 8 22:43:47 2008 +0930

    ephyr: some whitespace changes.

diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
index 1ec98fc..1399d7a 100644
--- a/hw/kdrive/ephyr/ephyrinit.c
+++ b/hw/kdrive/ephyr/ephyrinit.c
@@ -64,7 +64,7 @@ InitInput (int argc, char **argv)
 {
   KdKeyboardInfo *ki;
   KdPointerInfo *pi;
-        
+
   KdAddKeyboardDriver(&EphyrKeyboardDriver);
 #ifdef linux
   KdAddKeyboardDriver(&LinuxEvdevKeyboardDriver);
@@ -301,17 +301,17 @@ miPointerSpriteFuncRec EphyrPointerSpriteFuncs = {
 	ephyrUnrealizeCursor,
 	ephyrSetCursor,
 	ephyrMoveCursor,
-    ephyrDeviceCursorInitialize,
-        NULL
+	ephyrDeviceCursorInitialize,
+	NULL
 };
 
 
 Bool
 ephyrCursorInit(ScreenPtr pScreen)
 {
-  miPointerInitialize(pScreen, 
+  miPointerInitialize(pScreen,
 		      &EphyrPointerSpriteFuncs,
-		      &ephyrPointerScreenFuncs, 
+		      &ephyrPointerScreenFuncs,
 		      FALSE);
 
   return TRUE;
@@ -336,18 +336,18 @@ KdCardFuncs ephyrFuncs = {
     ephyrRestore,	    /* restore */
     ephyrScreenFini,	    /* scrfini */
     ephyrCardFini,	    /* cardfini */
-    
-    0,	                    /* initCursor */
-    0,          	    /* enableCursor */
+
+    0,			    /* initCursor */
+    0,			    /* enableCursor */
     0,			    /* disableCursor */
     0,			    /* finiCursor */
     0,			    /* recolorCursor */
-    
+
     0,			    /* initAccel */
     0,			    /* enableAccel */
     0,			    /* disableAccel */
     0,			    /* finiAccel */
-    
-    ephyrGetColors,    	    /* getColors */
+
+    ephyrGetColors,/* getColors */
     ephyrPutColors,	    /* putColors */
 };


More information about the xorg-commit mailing list