xserver: Branch 'master' - 9 commits

Keith Packard keithp at kemper.freedesktop.org
Wed May 25 08:44:32 PDT 2011


 dix/devices.c                  |    9 ---------
 dix/events.c                   |    7 ++++---
 dix/inpututils.c               |    2 +-
 fb/fbbltone.c                  |    4 ++--
 hw/kdrive/ephyr/ephyr.c        |   25 +++++++++++++++++++++++--
 hw/kdrive/ephyr/ephyrinit.c    |    7 ++++++-
 hw/xfree86/common/xf86Module.h |    2 +-
 hw/xfree86/common/xf86Xinput.c |   21 +++++++++++++++++++++
 hw/xfree86/man/xorg.conf.man   |   10 ++++++++++
 hw/xfree86/parser/InputClass.c |   21 +++++++++++++++++++++
 hw/xfree86/parser/xf86Parser.h |    1 +
 hw/xfree86/parser/xf86tokens.h |    1 +
 hw/xwin/winkeybd.c             |    6 ++----
 hw/xwin/winmouse.c             |    4 ++--
 include/input.h                |    6 ------
 include/inputstr.h             |    2 --
 mi/mieq.c                      |    1 +
 17 files changed, 96 insertions(+), 33 deletions(-)

New commits:
commit 4725d6b0dbb6371af4a1b2fbef851dcfe155514a
Merge: 1b2d177... b5d8287...
Author: Keith Packard <keithp at keithp.com>
Date:   Wed May 25 09:40:51 2011 -0600

    Merge remote-tracking branch 'whot/for-keith'

commit 1b2d17748f0154da142e9b421d4f6a46e4e5a18c
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sun May 22 13:50:14 2011 -0700

    fbbltone.c: Mark bitmasks as unsigned ints
    
    Clears many Sun compiler warnings:
    "fbbltone.c", line 491: warning: integer overflow detected: op "<<"
    "fbbltone.c", line 491: warning: integer overflow detected: op "<<"
    "fbbltone.c", line 491: warning: integer overflow detected: op "<<"
    "fbbltone.c", line 491: warning: initializer will be sign-extended: -16777216
    "fbbltone.c", line 491: warning: integer overflow detected: op "<<"
    "fbbltone.c", line 491: warning: initializer will be sign-extended: -1
    "fbbltone.c", line 495: warning: integer overflow detected: op "<<"
    "fbbltone.c", line 495: warning: integer overflow detected: op "<<"
    "fbbltone.c", line 495: warning: integer overflow detected: op "<<"
    "fbbltone.c", line 495: warning: initializer will be sign-extended: -256
    "fbbltone.c", line 495: warning: integer overflow detected: op "<<"
    "fbbltone.c", line 495: warning: initializer will be sign-extended: -1
    "fbbltone.c", line 499: warning: integer overflow detected: op "<<"
    "fbbltone.c", line 499: warning: integer overflow detected: op "<<"
    "fbbltone.c", line 499: warning: integer overflow detected: op "<<"
    "fbbltone.c", line 499: warning: initializer will be sign-extended: -65536
    "fbbltone.c", line 499: warning: integer overflow detected: op "<<"
    "fbbltone.c", line 499: warning: initializer will be sign-extended: -1
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Reviewed-by: Jamey Sharp <jamey at minilop.net>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/fb/fbbltone.c b/fb/fbbltone.c
index 0a91575..67e7853 100644
--- a/fb/fbbltone.c
+++ b/fb/fbbltone.c
@@ -428,8 +428,8 @@ fbBltOne (FbStip    *src,
 
 #define Mask24(x,r) (Mask24Pos(x,r) < FB_UNIT ? \
 		     (Mask24Pos(x,r) < 0 ? \
-		      0xffffff >> Mask24Neg (x,r) : \
-		      0xffffff << Mask24Check(x,r)) : 0)
+		      0xffffffU >> Mask24Neg (x,r) : \
+		      0xffffffU << Mask24Check(x,r)) : 0)
 
 #define SelMask24(b,n,r)	((((b) >> n) & 1) * Mask24(n,r))
 
commit b5d828789c092c994722a896c252212e2b3614ab
Author: Simon Thum <simon.thum at gmx.de>
Date:   Thu Mar 10 21:03:40 2011 +0100

    xserver: remove AbsoluteClass, breaking the A(P|B)I
    
    This struct was unused and has been effectively removed in
    commit 633b81e8ba09cc6a1ea8b43f323874fda2cf0bde
    Refs: xorg-server-1.10.0-133-g633b81e
    
    Remove the remainder, with an ABI bump to 13.0.
    
    Signed-off-by: Simon Thum <simon.thum at gmx.de>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/dix/devices.c b/dix/devices.c
index 9a4498b..0ccf252 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -1361,15 +1361,6 @@ InitPointerAccelerationScheme(DeviceIntPtr dev,
 }
 
 Bool
-InitAbsoluteClassDeviceStruct(DeviceIntPtr dev)
-{
-    /* This is an API-preserving noop. Instructions: Kill when no more drivers
-     * call it. The infrastructure behind hasn't really been used, so any calls
-     * are likely just a declaration that the device is absolute. */
-    return FALSE;
-}
-
-Bool
 InitFocusClassDeviceStruct(DeviceIntPtr dev)
 {
     FocusClassPtr focc;
diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h
index 94f17e9..2a5c805 100644
--- a/hw/xfree86/common/xf86Module.h
+++ b/hw/xfree86/common/xf86Module.h
@@ -83,7 +83,7 @@ typedef enum {
  */
 #define ABI_ANSIC_VERSION	SET_ABI_VERSION(0, 4)
 #define ABI_VIDEODRV_VERSION	SET_ABI_VERSION(11, 0)
-#define ABI_XINPUT_VERSION	SET_ABI_VERSION(12, 2)
+#define ABI_XINPUT_VERSION	SET_ABI_VERSION(13, 0)
 #define ABI_EXTENSION_VERSION	SET_ABI_VERSION(5, 0)
 #define ABI_FONT_VERSION	SET_ABI_VERSION(0, 6)
 
diff --git a/include/input.h b/include/input.h
index 4de4ff5..56847ed 100644
--- a/include/input.h
+++ b/include/input.h
@@ -305,12 +305,6 @@ extern _X_EXPORT Bool InitPointerAccelerationScheme(
     DeviceIntPtr /*dev*/,
     int /*scheme*/);
 
-/**
- * This is not implemented and just returns FALSE.
- */
-extern _X_EXPORT _X_DEPRECATED Bool InitAbsoluteClassDeviceStruct(
-    DeviceIntPtr /*device*/);
-
 extern _X_EXPORT Bool InitFocusClassDeviceStruct(
     DeviceIntPtr /*device*/);
 
diff --git a/include/inputstr.h b/include/inputstr.h
index bc0accc..00f72c2 100644
--- a/include/inputstr.h
+++ b/include/inputstr.h
@@ -371,7 +371,6 @@ typedef struct _ClassesRec {
     ButtonClassPtr	button;
     FocusClassPtr	focus;
     ProximityClassPtr	proximity;
-    void*               _pad0; /* keep ABI during AbsoluteClass removal */
     KbdFeedbackPtr	kbdfeed;
     PtrFeedbackPtr	ptrfeed;
     IntegerFeedbackPtr	intfeed;
@@ -496,7 +495,6 @@ typedef struct _DeviceIntRec {
     ButtonClassPtr	button;
     FocusClassPtr	focus;
     ProximityClassPtr	proximity;
-    void*               _pad0;          /* keep ABI, was pointer to abs class */
     KbdFeedbackPtr	kbdfeed;
     PtrFeedbackPtr	ptrfeed;
     IntegerFeedbackPtr	intfeed;
commit c05c8640f13708384e77579e7714ca846fa93f5c
Author: Oleh Nykyforchyn <oleh.nyk at gmail.com>
Date:   Thu May 19 09:39:52 2011 +0300

    xfree86: Allow "MatchLayout" statements in config files
    
    Usage example (tested on a dual-seat PC):
    Section "InputClass"
     	Identifier "keyboard-all"
     	MatchIsKeyboard "on"
     	MatchDevicePath "/dev/input/event*"
     	MatchLayout "!GeForce|!Matrox"
     	Driver "evdev"
     	Option "XkbLayout" "us"
     	Option "XkbOptions" "terminate:ctrl_alt_bksp"
    EndSection
    
    It disables auto keyboard configuration for layouts "GeForce" and "Matrox".
    Note that "" in patterns means "no Layout sections found", e.g.
     	MatchLayout "GeForce|"
    is "in layout GeForce or without explicit layout at all".
    
    Signed-off-by: Oleh Nykyforchyn <oleh.nyk at gmail.com>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Acked-by: Dan Nicholson <dbn.lists at gmail.com>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index e7e1ce1..26051ad 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -470,6 +470,20 @@ match_path_pattern(const char *attr, const char *pattern)
 #endif
 
 /*
+ * If no Layout section is found, xf86ServerLayout.id becomes "(implicit)"
+ * It is convenient that "" in patterns means "no explicit layout"
+ */
+static int
+match_string_implicit(const char *attr, const char *pattern)
+{
+    if (strlen(pattern)) {
+        return strcmp(attr, pattern);
+    } else {
+        return strcmp(attr,"(implicit)");
+    }
+}
+
+/*
  * Match an attribute against a list of NULL terminated arrays of patterns.
  * If a pattern in each list entry is matched, return TRUE.
  */
@@ -564,6 +578,13 @@ InputClassMatches(const XF86ConfInputClassPtr iclass, const InputInfoPtr idev,
             return FALSE;
     }
 
+    /* MatchLayout string */
+    if (!list_is_empty(&iclass->match_layout)) {
+        if (!MatchAttrToken(xf86ConfigLayout.id,
+                            &iclass->match_layout, match_string_implicit))
+            return FALSE;
+    }
+
     /* MatchIs* booleans */
     if (iclass->is_keyboard.set &&
         iclass->is_keyboard.val != !!(attrs->flags & ATTR_KEYBOARD))
diff --git a/hw/xfree86/man/xorg.conf.man b/hw/xfree86/man/xorg.conf.man
index 4bec316..f406f82 100644
--- a/hw/xfree86/man/xorg.conf.man
+++ b/hw/xfree86/man/xorg.conf.man
@@ -1140,6 +1140,16 @@ matches the
 pattern. A match is found if at least one of the tags given in
 .RI \*q matchtag \*q
 matches at least one of the tags assigned by the backend.
+.TP 7
+.BI "MatchLayout \*q" matchlayout \*q
+Check the case-sensitive string
+.RI \*q matchlayout \*q
+against the currently active
+.B ServerLayout
+section. The empty string "" matches an implicit layout which appears
+if no named
+.B ServerLayout
+sections have been found.
 .PP
 The second type of entry is used to match device types. These entries take a
 boolean argument similar to
diff --git a/hw/xfree86/parser/InputClass.c b/hw/xfree86/parser/InputClass.c
index 9f88e7e..3f80170 100644
--- a/hw/xfree86/parser/InputClass.c
+++ b/hw/xfree86/parser/InputClass.c
@@ -52,6 +52,7 @@ xf86ConfigSymTabRec InputClassTab[] =
     {MATCH_USBID, "matchusbid"},
     {MATCH_DRIVER, "matchdriver"},
     {MATCH_TAG, "matchtag"},
+    {MATCH_LAYOUT, "matchlayout"},
     {MATCH_IS_KEYBOARD, "matchiskeyboard"},
     {MATCH_IS_POINTER, "matchispointer"},
     {MATCH_IS_JOYSTICK, "matchisjoystick"},
@@ -94,6 +95,7 @@ xf86parseInputClassSection(void)
     list_init(&ptr->match_usbid);
     list_init(&ptr->match_driver);
     list_init(&ptr->match_tag);
+    list_init(&ptr->match_layout);
 
     while ((token = xf86getToken(InputClassTab)) != ENDSECTION) {
         switch (token) {
@@ -169,6 +171,12 @@ xf86parseInputClassSection(void)
             add_group_entry(&ptr->match_tag,
                             xstrtokenize(val.str, TOKEN_SEP));
             break;
+        case MATCH_LAYOUT:
+            if (xf86getSubToken(&(ptr->comment)) != STRING)
+                Error(QUOTE_MSG, "MatchLayout");
+            add_group_entry(&ptr->match_layout,
+                            xstrtokenize(val.str, TOKEN_SEP));
+            break;
         case MATCH_IS_KEYBOARD:
             if (xf86getSubToken(&(ptr->comment)) != STRING)
                 Error(QUOTE_MSG, "MatchIsKeyboard");
@@ -307,6 +315,13 @@ xf86printInputClassSection (FILE * cf, XF86ConfInputClassPtr ptr)
                         *cur);
             fprintf(cf, "\"\n");
         }
+        list_for_each_entry(group, &ptr->match_layout, entry) {
+            fprintf(cf, "\tMatchLayout     \"");
+            for (cur = group->values; *cur; cur++)
+                fprintf(cf, "%s%s", cur == group->values ? "" : TOKEN_SEP,
+                        *cur);
+            fprintf(cf, "\"\n");
+        }
 
         if (ptr->is_keyboard.set)
             fprintf(cf, "\tIsKeyboard      \"%s\"\n",
@@ -392,6 +407,12 @@ xf86freeInputClassList (XF86ConfInputClassPtr ptr)
                 free(*list);
             free(group);
         }
+        list_for_each_entry_safe(group, next, &ptr->match_layout, entry) {
+            list_del(&group->entry);
+            for (list = group->values; *list; list++)
+                free(*list);
+            free(group);
+        }
 
         TestFree(ptr->comment);
         xf86optionListFree(ptr->option_lst);
diff --git a/hw/xfree86/parser/xf86Parser.h b/hw/xfree86/parser/xf86Parser.h
index 4f279f1..a8785c5 100644
--- a/hw/xfree86/parser/xf86Parser.h
+++ b/hw/xfree86/parser/xf86Parser.h
@@ -358,6 +358,7 @@ typedef struct
 	struct list match_usbid;
 	struct list match_driver;
 	struct list match_tag;
+	struct list match_layout;
 	xf86TriState is_keyboard;
 	xf86TriState is_pointer;
 	xf86TriState is_joystick;
diff --git a/hw/xfree86/parser/xf86tokens.h b/hw/xfree86/parser/xf86tokens.h
index 468a2ff..abcafcf 100644
--- a/hw/xfree86/parser/xf86tokens.h
+++ b/hw/xfree86/parser/xf86tokens.h
@@ -282,6 +282,7 @@ typedef enum {
     MATCH_USBID,
     MATCH_DRIVER,
     MATCH_TAG,
+    MATCH_LAYOUT,
     MATCH_IS_KEYBOARD,
     MATCH_IS_POINTER,
     MATCH_IS_JOYSTICK,
commit 83c059f03463f2d7f41e172afe510d1ca9bba8b0
Author: Tomas Frydrych <tomas at sleepfive.com>
Date:   Wed May 18 20:49:52 2011 +0100

    Xephyr: fix pointer coordinate translation when screen is rotated
    
    In the Xephyr case the position of the pointer relative toward the
    Xephyr window is controlled by the host server without taking into
    account rotation of the Xephyr screen. Consequently the pointer coords
    must always be translated when the fb is rotated.
    
    Signed-off-by: Tomas Frydrych <tomas at sleepfive.com>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index 8096a24..ac8e5be 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -52,6 +52,7 @@ Bool ephyrNoDRI=FALSE ;
 Bool ephyrNoXV=FALSE ;
 
 static int mouseState = 0;
+static Rotation ephyrRandr = RR_Rotate_0;
 
 typedef struct _EphyrInputPrivate {
     Bool    enabled;
@@ -249,7 +250,11 @@ ephyrMapFramebuffer (KdScreenInfo *screen)
   EPHYR_LOG("screen->width: %d, screen->height: %d index=%d",
 	     screen->width, screen->height, screen->mynum);
   
-  KdComputePointerMatrix (&m, scrpriv->randr, screen->width, screen->height);
+  /*
+   * Use the rotation last applied to ourselves (in the Xephyr case the fb
+   * coordinate system moves independently of the pointer coordiante system).
+   */
+  KdComputePointerMatrix (&m, ephyrRandr, screen->width, screen->height);
   KdSetPointerMatrix (&m);
   
   priv->bytes_per_line = ((screen->width * screen->fb.bitsPerPixel + 31) >> 5) << 2;
@@ -530,7 +535,15 @@ ephyrRandRSetConfig (ScreenPtr		pScreen,
    * Set new configuration
    */
   
-  scrpriv->randr = KdAddRotation (screen->randr, randr);
+  /*
+   * We need to store the rotation value for pointer coords transformation;
+   * though initially the pointer and fb rotation are identical, when we map
+   * the fb, the screen will be reinitialized and return into an unrotated
+   * state (presumably the HW is taking care of the rotation of the fb), but the
+   * pointer still needs to be transformed.
+   */
+  ephyrRandr = KdAddRotation (screen->randr, randr);
+  scrpriv->randr = ephyrRandr;
   
   ephyrUnmapFramebuffer (screen); 
   
@@ -1058,6 +1071,14 @@ MouseInit (KdPointerInfo *pi)
     pi->nButtons = 32;
     free(pi->name);
     pi->name = strdup("Xephyr virtual mouse");
+
+    /*
+     * Must transform pointer coords since the pointer position
+     * relative to the Xephyr window is controlled by the host server and
+     * remains constant regardless of any rotation applied to the Xephyr screen.
+     */
+    pi->transformCoordinates = TRUE;
+
     ephyrMouse = pi;
     return Success;
 }
commit b387069fafbe549f2091f364e2aa92af6cc21261
Author: Tomas Frydrych <tomas at sleepfive.com>
Date:   Wed May 18 20:47:52 2011 +0100

    Xephyr: added dummy ephyrDeviceCursorCleanup() to avoid crashing
    
    The DeviceCursorCleanup in miPointerSpriteFuncRec can no longer be
    NULL it seems.
    
    Signed-off-by: Tomas Frydrych <tomas at sleepfive.com>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
index 27cab3b..2deb7b8 100644
--- a/hw/kdrive/ephyr/ephyrinit.c
+++ b/hw/kdrive/ephyr/ephyrinit.c
@@ -358,13 +358,18 @@ ephyrDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen)
   return TRUE;
 }
 
+static void
+ephyrDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen)
+{
+}
+
 miPointerSpriteFuncRec EphyrPointerSpriteFuncs = {
 	ephyrRealizeCursor,
 	ephyrUnrealizeCursor,
 	ephyrSetCursor,
 	ephyrMoveCursor,
 	ephyrDeviceCursorInitialize,
-	NULL
+	ephyrDeviceCursorCleanup
 };
 
 
commit 53ccc54ac71c2655276678e13f0b3d879d691489
Author: Colin Harrison <colin.harrison at virgin.net>
Date:   Mon May 16 19:31:57 2011 +0100

    Fix XWin compilation after updates for input API changes
    
    Fix XWin compilation after updates for input API changes in commits
    e7150db5 8670c46b and 20fb07f4
    
    Also remove a no longer needed InternalEvent* variable
    
    Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/hw/xwin/winkeybd.c b/hw/xwin/winkeybd.c
index 2fa6b3f..a3112ff 100644
--- a/hw/xwin/winkeybd.c
+++ b/hw/xwin/winkeybd.c
@@ -472,8 +472,6 @@ winKeybdReleaseKeys (void)
 void
 winSendKeyEvent (DWORD dwKey, Bool fDown)
 {
-  InternalEvent* events;
-
   /*
    * When alt-tabing between screens we can get phantom key up messages
    * Here we only pass them through it we think we should!
@@ -485,8 +483,8 @@ winSendKeyEvent (DWORD dwKey, Bool fDown)
 
   QueueKeyboardEvents(g_pwinKeyboard, fDown ? KeyPress : KeyRelease, dwKey + MIN_KEYCODE, NULL);
 
-  winDebug("winSendKeyEvent: dwKey: %d, fDown: %d, nEvents %d\n",
-           dwKey, fDown, nevents);
+  winDebug("winSendKeyEvent: dwKey: %d, fDown: %d\n",
+           dwKey, fDown);
 }
 
 BOOL winCheckKeyPressed(WPARAM wParam, LPARAM lParam)
diff --git a/hw/xwin/winmouse.c b/hw/xwin/winmouse.c
index b1b0657..752334a 100644
--- a/hw/xwin/winmouse.c
+++ b/hw/xwin/winmouse.c
@@ -244,8 +244,8 @@ winMouseButtonsSendEvent (int iEventType, int iButton)
 		     POINTER_RELATIVE, &mask);
 
 #if CYGDEBUG
-  ErrorF("winMouseButtonsSendEvent: iEventType: %d, iButton: %d, nEvents %d\n",
-          iEventType, iButton, nevents);
+  ErrorF("winMouseButtonsSendEvent: iEventType: %d, iButton: %d\n",
+          iEventType, iButton);
 #endif
 }
 
commit 4c4df3ac0d8162c874b85fede12ffbe42f0062c3
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Sat May 14 16:23:59 2011 -0700

    input: Don't implicitly define verify_internal_event
    
    Fixes regression introduced by 56901998020b6f443cbaa5eb303100d979e81b22
    
    mieq.c:159:5: error: implicit declaration of function 'verify_internal_event' is invalid in C99 [-Wimplicit-function-declaration,Semantic Issue]
        verify_internal_event(e);
        ^
    1 error generated.
    
    Also includes some other warning cleanups in events.c we're there.
    
    events.c:2198:24: warning: equality comparison with extraneous parentheses [-Wparentheses,Semantic Issue]
            else if ((type == MotionNotify))
                      ~~~~~^~~~~~~~~~~~~~~
    events.c:2198:24: note: remove extraneous parentheses around the comparison to silence this warning [Semantic Issue]
            else if ((type == MotionNotify))
                     ~     ^              ~
    events.c:2198:24: note: use '=' to turn this equality comparison into an assignment [Semantic Issue]
            else if ((type == MotionNotify))
                           ^~
                           =
    events.c:2487:5: error: implicit declaration of function 'verify_internal_event' is invalid in C99 [-Wimplicit-function-declaration,Semantic Issue]
        verify_internal_event(event);
        ^
    events.c:5909:22: warning: declaration shadows a local variable [-Wshadow,Semantic Issue]
            DeviceIntPtr it = inputInfo.devices;
                         ^
    events.c:5893:18: note: previous declaration is here
        DeviceIntPtr it = inputInfo.devices;
                     ^
    3 warnings and 1 error generated.
    
    events.c:2836:27: warning: incompatible pointer types passing 'DeviceEvent *' (aka 'struct _DeviceEvent *') to parameter of type
          'const InternalEvent *' (aka 'const union _InternalEvent *')
        verify_internal_event(ev);
                              ^~
    ../include/inpututils.h:40:56: note: passing argument to parameter 'ev' here
    extern void verify_internal_event(const InternalEvent *ev);
                                                           ^
    1 warning generated.
    
    Found-by: yuffie tinderbox (-Werror=implicit)
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/dix/events.c b/dix/events.c
index 14f6f90..b60c299 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -112,6 +112,7 @@ Equipment Corporation.
 #include <X11/Xproto.h>
 #include "windowstr.h"
 #include "inputstr.h"
+#include "inpututils.h"
 #include "scrnintstr.h"
 #include "cursorstr.h"
 
@@ -2195,7 +2196,7 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent
          */
         if (!grab && ActivateImplicitGrab(pDev, client, pWin, pEvents, deliveryMask))
             /* grab activated */;
-        else if ((type == MotionNotify))
+        else if (type == MotionNotify)
             pDev->valuator->motionHintWindow = pWin;
         else if (type == DeviceMotionNotify || type == DeviceButtonPress)
                 CheckDeviceGrabAndHintWindow (pWin, type,
@@ -2832,7 +2833,7 @@ CheckMotion(DeviceEvent *ev, DeviceIntPtr pDev)
     WindowPtr prevSpriteWin, newSpriteWin;
     SpritePtr pSprite = pDev->spriteInfo->sprite;
 
-    verify_internal_event(ev);
+    verify_internal_event((InternalEvent *)ev);
 
     prevSpriteWin = pSprite->win;
 
@@ -5906,7 +5907,7 @@ PickPointer(ClientPtr client)
 
     if (!client->clientPtr)
     {
-        DeviceIntPtr it = inputInfo.devices;
+        it = inputInfo.devices;
         while (it)
         {
             if (IsMaster(it) && it->spriteInfo->spriteOwner)
diff --git a/mi/mieq.c b/mi/mieq.c
index 031b11a..fc3738a 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -43,6 +43,7 @@ in this Software without prior written authorization from The Open Group.
 # include   "windowstr.h"
 # include   "pixmapstr.h"
 # include   "inputstr.h"
+# include   "inpututils.h"
 # include   "mi.h"
 # include   "mipointer.h"
 # include   "scrnintstr.h"
commit ba7d1020ac0135ebc8acda4cd57ed48b331e0133
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Sat May 14 16:31:10 2011 -0700

    input: Fix format string for verify_internal_event
    
    inpututils.c:577:25: warning: conversion specifies type 'unsigned short' but the argument has type 'unsigned char' [-Wformat,Format String Issue]
                ErrorF("%02hx ", *data);
                        ~~~~^    ~~~~~
                        %02hhx
    1 warning generated.
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/dix/inpututils.c b/dix/inpututils.c
index aeace6e..49e1758 100644
--- a/dix/inpututils.c
+++ b/dix/inpututils.c
@@ -574,7 +574,7 @@ void verify_internal_event(const InternalEvent *ev)
 
         for (i = 0; i < sizeof(xEvent); i++, data++)
         {
-            ErrorF("%02hx ", *data);
+            ErrorF("%02hhx ", *data);
 
             if ((i % 8) == 7)
                 ErrorF("\n");


More information about the xorg-commit mailing list