xserver: Branch 'master' - 2 commits

Daniel Stone daniels at kemper.freedesktop.org
Fri Feb 16 23:03:37 EET 2007


 hw/kdrive/ephyr/hostx.c |    6 +++---
 hw/kdrive/ephyr/hostx.h |    2 +-
 hw/kdrive/src/kinput.c  |   25 -------------------------
 3 files changed, 4 insertions(+), 29 deletions(-)

New commits:
diff-tree 68d39d8571d8717d26cedc84015d537549520a14 (from 5507cb885d861e974be240120ada2ace2a980a72)
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Fri Feb 16 23:02:13 2007 +0200

    kdrive/ephyr: fix keysym type confusion once and for all
    
    Take keysyms in as an XID in hostx_load_keymap() and explicitly
    convert them to CARD32 for loading into the server.  Fixes Xephyr on
    AMD64, wa-hey.

diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
index 573f774..36d3cbd 100644
--- a/hw/kdrive/ephyr/hostx.c
+++ b/hw/kdrive/ephyr/hostx.c
@@ -656,7 +656,7 @@ hostx_paint_debug_rect(int x,     int y,
 void
 hostx_load_keymap(void)
 {
-  KeySym          *keymap;
+  XID             *keymap;
   int              host_width, min_keycode, max_keycode, width;
   int              i,j;
 
@@ -677,7 +677,7 @@ hostx_load_keymap(void)
    */
   width = (host_width > 4) ? 4 : host_width;
 
-  ephyrKeySyms.map = (KeySym *)calloc(sizeof(KeySym),
+  ephyrKeySyms.map = (CARD32 *)calloc(sizeof(CARD32),
                                       (max_keycode - min_keycode + 1) *
                                       width);
   if (!ephyrKeySyms.map)
@@ -685,7 +685,7 @@ hostx_load_keymap(void)
 
   for (i=0; i<(max_keycode - min_keycode+1); i++)
     for (j=0; j<width; j++)
-      ephyrKeySyms.map[(i*width)+j] = keymap[(i*host_width) + j];
+      ephyrKeySyms.map[(i*width)+j] = (CARD32) keymap[(i*host_width) + j];
 
   EPHYR_DBG("keymap width, host:%d kdrive:%d", host_width, width);
   
diff --git a/hw/kdrive/ephyr/hostx.h b/hw/kdrive/ephyr/hostx.h
index 4e3c6af..4d5f37f 100644
--- a/hw/kdrive/ephyr/hostx.h
+++ b/hw/kdrive/ephyr/hostx.h
@@ -56,7 +56,7 @@ typedef struct {
   int             minKeyCode;
   int             maxKeyCode;
   int             mapWidth;
-  KeySym         *map;
+  CARD32         *map;
 } EphyrKeySyms;
 
 struct EphyrHostXEvent
diff-tree 5507cb885d861e974be240120ada2ace2a980a72 (from 84efe23ae834dd3a4d3f3e08832b69469c7382aa)
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Fri Feb 16 23:01:27 2007 +0200

    kdrive: delete input debugging, yet again ...
    
    I have no idea how this keeps on coming back.

diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c
index 83da67f..3bf6bad 100644
--- a/hw/kdrive/src/kinput.c
+++ b/hw/kdrive/src/kinput.c
@@ -1915,11 +1915,6 @@ KdEnqueueKeyboardEvent(KdKeyboardInfo   
     KeybdCtrl *ctrl = NULL;
     int type, nEvents, i;
 
-#ifdef DEBUG
-    ErrorF("enqueuing kb event (scancode %d, %s)\n", scan_code, is_up ? "up" : "down");
-    ErrorF("event is from %s\n", ki->name);
-#endif
-    
     if (!ki || !ki->dixdev || !ki->dixdev->kbdfeed || !ki->dixdev->key)
 	return;
 
@@ -1947,9 +1942,6 @@ KdEnqueueKeyboardEvent(KdKeyboardInfo   
 	}
 	
         nEvents = GetKeyboardEvents(kdEvents, ki->dixdev, type, key_code);
-#ifdef DEBUG
-        ErrorF("KdEnqueueKeyboardEvent: got %d events from GKE\n", nEvents);
-#endif
         for (i = 0; i < nEvents; i++)
             KdQueueEvent(ki->dixdev, kdEvents + i);
     }
@@ -2009,12 +2001,6 @@ KdEnqueuePointerEvent(KdPointerInfo *pi,
     }
     z = rz;
 
-#ifdef DEBUG
-    ErrorF("sending motion notification for (%d, %d, %d)\n", x, y, z);
-    ErrorF("  comes from (%d, %d, %d)\n", rx, ry, rz);
-    ErrorF("  is %s\n", (flags & KD_MOUSE_DELTA) ? "relative" : "absolute");
-#endif
-
     if (flags & KD_MOUSE_DELTA)
         dixflags = POINTER_RELATIVE & POINTER_ACCELERATE;
     else
@@ -2028,9 +2014,6 @@ KdEnqueuePointerEvent(KdPointerInfo *pi,
          button <<= 1, n++) {
         if (((pi->buttonState & button) ^ (buttons & button)) &&
            !(buttons & button)) {
-#ifdef DEBUG
-            ErrorF("  posting button release %d\n", n);
-#endif
             _KdEnqueuePointerEvent(pi, ButtonRelease, x, y, z, n,
                                    dixflags, FALSE);
 	}
@@ -2039,9 +2022,6 @@ KdEnqueuePointerEvent(KdPointerInfo *pi,
          button <<= 1, n++) {
 	if (((pi->buttonState & button) ^ (buttons & button)) &&
 	    (buttons & button)) {
-#ifdef DEBUG
-            ErrorF("  posting button press %d\n", n);
-#endif
             _KdEnqueuePointerEvent(pi, ButtonPress, x, y, z, n,
                                    dixflags, FALSE);
         }
@@ -2057,11 +2037,6 @@ _KdEnqueuePointerEvent (KdPointerInfo *p
     int nEvents = 0, i = 0;
     int valuators[3] = { x, y, z };
 
-#ifdef DEBUG
-    ErrorF("mouse enqueuing event from device %s (%d, %d, %d; %d)\n",
-           pi->name, x, y, z, b);
-#endif
-
     /* TRUE from KdHandlePointerEvent, means 'we swallowed the event'. */
     if (!force && KdHandlePointerEvent(pi, type, x, y, z, b, absrel))
         return;



More information about the xorg-commit mailing list