[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xorg-server: Changes to 'debian-unstable'



 ChangeLog                     |  125 ++++++++++++++++++++++++++++++++++++++++++
 Xi/chgdctl.c                  |    2 
 debian/changelog              |    4 +
 hw/xfree86/modes/xf86Rotate.c |    3 -
 4 files changed, 132 insertions(+), 2 deletions(-)

New commits:
commit 22cb9822078cd2cb6cc7cfabbf5e40684b45c56b
Author: Julien Cristau <jcristau@debian.org>
Date:   Wed Jul 30 09:24:57 2008 +0200

    update changelogs

diff --git a/ChangeLog b/ChangeLog
index f25053b..acd1878 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,128 @@
+commit ff49f5944d06b17fb904c4f64b8660aab60d8d0d
+Author: Alex Deucher <alex@samba.(none)>
+Date:   Thu Jan 3 22:53:36 2008 -0500
+
+    Fix potential crasher in xf86CrtcRotate()
+    
+    xf86CrtcRotate() is called by randr 1.2 drivers via xf86CrtcSetMode() or xf86SetDesiredModes()
+    during ScreenInit() at which point pScrn->pScreen is not set. If a user specifies a rotation
+    in their config file pScrn->pScreen is dereferenced and boom.
+
+commit 969f1db96b03afa51dacce466320d311e5c9ce72
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Jul 29 13:17:27 2008 +0930
+
+    Revert "kdrive: don't post motion event if there was no motion. #16179"
+    
+    This reverts commit 5903b4c749c1136d0f3e91d5e6321b08c31da4bf.
+    
+    And this one wasn't supposed to be pushed too.
+
+commit a49d811065701c5f3abb25b9e4945ce7547d0b53
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Jul 29 13:15:50 2008 +0930
+
+    Revert "xkb: delete default rules when devices are closed."
+    
+    This reverts commit 7cdef0d6fc3ec6705a61014b741a4c24dc60973b.
+    
+    Nor was this one.
+
+commit f0f3a11acd48dd233e8808101dcc8a22591fd00c
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Jul 29 13:15:34 2008 +0930
+
+    Revert "xkb: reset xkb_cached_map on CloseDownDevices."
+    
+    This reverts commit 9b62355847ce7df1ca144b4ebc9ff5c7286b573d.
+    
+    This wasn't supposed to be pushed either.
+
+commit b50932d998f9fe81d01a8cd22d9613aaf9136985
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Jul 29 13:14:02 2008 +0930
+
+    Revert "xfree86: AllowEmptyInput is now enabled by default if hotplugging is enabled."
+    
+    This reverts commit 153c6d48c655b3eca9a33b7487b238b42a4a3f8e.
+    
+    How did this one end up on the branch? Sure as hell wasn't supposed to be
+    pushed.
+
+commit 48a9996192613ab259549cdb7c8735d2fb31ed78
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Jul 29 10:00:01 2008 +0930
+
+    Xi: ChangeDeviceControl presence events should set the appropriate devchange.
+    
+    Requires inputproto 1.4.4 or higher.
+    (cherry picked from commit 591ef3c047ab3597fef9d687205e99c254ff2040)
+    
+    Modified to use the numeric value of DeviceControlChanged instead of the
+    define, just so we don't bork out if someone rebuilds without updating
+    inputproto. This is a released server, after all.
+
+commit 153c6d48c655b3eca9a33b7487b238b42a4a3f8e
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Jul 3 15:05:14 2008 +0930
+
+    xfree86: AllowEmptyInput is now enabled by default if hotplugging is enabled.
+    
+    Remove AEI check from configImpliedLayout as the setting isn't actually parsed
+    at this point anyway (written by Sasha Hlusiak).
+    
+    Resurrect checkInput() and check for devices there if AEI is false (this also
+    creates the default devices if required).
+    
+    Set AllowEmptyInput to enabled by default if hotplugging is enabled.
+    (cherry picked from commit bea743f3d629bafdc301f40e9c0bc11382dfe8bc)
+    
+    Conflicts:
+    
+    	hw/xfree86/common/xf86Config.c
+    	hw/xfree86/doc/man/xorg.conf.man.pre
+
+commit 9b62355847ce7df1ca144b4ebc9ff5c7286b573d
+Author: Peter Hutterer <peter@cs.unisa.edu.au>
+Date:   Wed Jun 4 11:10:11 2008 +0930
+
+    xkb: reset xkb_cached_map on CloseDownDevices.
+    
+    Could lead to some invalid pointers in the second server generation.
+    (cherry picked from commit ff3adf3e564d94fea18e48f966de40a7ded1279e)
+
+commit 7cdef0d6fc3ec6705a61014b741a4c24dc60973b
+Author: Peter Hutterer <peter@cs.unisa.edu.au>
+Date:   Sun Jun 1 15:20:42 2008 +0930
+
+    xkb: delete default rules when devices are closed.
+    
+    We only have one set of default rules options in xkb. When the second keyboard
+    is brought up with Xkb options specified, these new options overwrite the old.
+    In future server generations, the rules used for the VCK are a mixture of the
+    default ones and ones previously specified for other keyboards. Simply
+    resetting the xkb default rules to NULL avoids this issue.
+    
+    Reproducable by setting XkbLayout "de" and XkbVariant "nodeadkeys". In the
+    second server generation, the VCK has "us(nodeadkeys)". This again produces a
+    SIGABRT when the first key is hit.
+    
+    I could not figure out why the SIGABRT happens. This patch is avoiding the
+    issue rather than fixing it.
+    (cherry picked from commit 5a3d06b8f42473cea3741dc722a775deaa2b73f6)
+
+commit 5903b4c749c1136d0f3e91d5e6321b08c31da4bf
+Author: Peter Hutterer <peter@cs.unisa.edu.au>
+Date:   Mon Jun 2 11:04:41 2008 +0930
+
+    kdrive: don't post motion event if there was no motion. #16179
+    
+    Based on the patch by Tomas Janousek.
+    Backported from master to server-1.4.
+    
+    X.Org Bug 16179 <http://bugs.freedesktop.org/show_bug.cgi?id=16179>
+    (cherry picked from commit 26e7e69ab893d1f2b35213250ada40ec90944f62)
+
 commit c3a7903f6a6a27e53ba0372408e0c5a68c608e86
 Author: Julien Cristau <jcristau@debian.org>
 Date:   Wed Jun 11 16:27:10 2008 +0200
diff --git a/debian/changelog b/debian/changelog
index 4041d9c..13b1be9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,10 @@ xorg-server (2:1.4.2-3) UNRELEASED; urgency=low
     Petrișor!
   * Update Dutch debconf translation (closes: #491663).  Thanks, Thijs
     Kinkhorst!
+  * Pull from server-1.4-branch:
+    - Xi: ChangeDeviceControl presence events should set the appropriate
+      devchange
+    - Fix potential crasher in xf86CrtcRotate()
 
  -- Julien Cristau <jcristau@debian.org>  Fri, 18 Jul 2008 17:00:16 +0200
 

commit ff49f5944d06b17fb904c4f64b8660aab60d8d0d
Author: Alex Deucher <alex@samba.(none)>
Date:   Thu Jan 3 22:53:36 2008 -0500

    Fix potential crasher in xf86CrtcRotate()
    
    xf86CrtcRotate() is called by randr 1.2 drivers via xf86CrtcSetMode() or xf86SetDesiredModes()
    during ScreenInit() at which point pScrn->pScreen is not set. If a user specifies a rotation
    in their config file pScrn->pScreen is dereferenced and boom.

diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index dd0e659..e2d6295 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -494,7 +494,8 @@ xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation)
 {
     ScrnInfoPtr		pScrn = crtc->scrn;
     xf86CrtcConfigPtr   xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
-    ScreenPtr		pScreen = pScrn->pScreen;
+    /* if this is called during ScreenInit() we don't have pScrn->pScreen yet */
+    ScreenPtr		pScreen = screenInfo.screens[pScrn->scrnIndex];
     PictTransform	crtc_to_fb, fb_to_crtc;
     
     PictureTransformIdentity (&crtc_to_fb);

commit 969f1db96b03afa51dacce466320d311e5c9ce72
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Jul 29 13:17:27 2008 +0930

    Revert "kdrive: don't post motion event if there was no motion. #16179"
    
    This reverts commit 5903b4c749c1136d0f3e91d5e6321b08c31da4bf.
    
    And this one wasn't supposed to be pushed too.

diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c
index d53a0d9..6c247c1 100644
--- a/hw/kdrive/src/kinput.c
+++ b/hw/kdrive/src/kinput.c
@@ -2066,7 +2066,7 @@ KdEnqueuePointerEvent(KdPointerInfo *pi, unsigned long flags, int rx, int ry,
     int           (*matrix)[3] = kdPointerMatrix.matrix;
     unsigned long button;
     int           n;
-    int           dixflags = 0;
+    int           dixflags;
 
     if (!pi)
 	return;
@@ -2097,15 +2097,11 @@ KdEnqueuePointerEvent(KdPointerInfo *pi, unsigned long flags, int rx, int ry,
     z = rz;
 
     if (flags & KD_MOUSE_DELTA)
-    {
-        if (x || y || z)
-            dixflags = POINTER_RELATIVE | POINTER_ACCELERATE;
-    } else if ((pi->dixdev->valuator) && (x != pi->dixdev->valuator->lastx ||
-                                          y != pi->dixdev->valuator->lasty))
-            dixflags = POINTER_ABSOLUTE;
-
-    if (dixflags)
-        _KdEnqueuePointerEvent(pi, MotionNotify, x, y, z, 0, dixflags, FALSE);
+        dixflags = POINTER_RELATIVE & POINTER_ACCELERATE;
+    else
+        dixflags = POINTER_ABSOLUTE;
+
+    _KdEnqueuePointerEvent(pi, MotionNotify, x, y, z, 0, dixflags, FALSE);
 
     buttons = flags;
 

commit a49d811065701c5f3abb25b9e4945ce7547d0b53
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Jul 29 13:15:50 2008 +0930

    Revert "xkb: delete default rules when devices are closed."
    
    This reverts commit 7cdef0d6fc3ec6705a61014b741a4c24dc60973b.
    
    Nor was this one.

diff --git a/dix/devices.c b/dix/devices.c
index c02b7ae..f6f3c8e 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -634,9 +634,6 @@ CloseDownDevices(void)
     inputInfo.off_devices = NULL;
     inputInfo.keyboard = NULL;
     inputInfo.pointer = NULL;
-#ifdef XKB
-    XkbDeleteRulesDflts();
-#endif
 }
 
 /**
diff --git a/include/xkbsrv.h b/include/xkbsrv.h
index b52eb65..acf3bb0 100644
--- a/include/xkbsrv.h
+++ b/include/xkbsrv.h
@@ -895,10 +895,6 @@ extern	void	XkbSetRulesDflts(
 	char *			/* options */
 );
 
-extern	void	XkbDeleteRulesDflts(
-	void
-);
-
 extern	void	XkbInitDevice(
 	DeviceIntPtr 	/* pXDev */
 );
diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c
index 87ee072..c0867ad 100644
--- a/xkb/xkbInit.c
+++ b/xkb/xkbInit.c
@@ -278,21 +278,6 @@ XkbSetRulesDflts(char *rulesFile,char *model,char *layout,
     return;
 }
 
-void
-XkbDeleteRulesDflts()
-{
-    _XkbFree(XkbRulesFile);
-    XkbRulesFile = NULL;
-    _XkbFree(XkbModelDflt);
-    XkbModelDflt = NULL;
-    _XkbFree(XkbLayoutDflt);
-    XkbLayoutDflt = NULL;
-    _XkbFree(XkbVariantDflt);
-    XkbVariantDflt = NULL;
-    _XkbFree(XkbOptionsDflt);
-    XkbOptionsDflt = NULL;
-}
-
 /***====================================================================***/
 
 #if defined(luna)

commit f0f3a11acd48dd233e8808101dcc8a22591fd00c
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Jul 29 13:15:34 2008 +0930

    Revert "xkb: reset xkb_cached_map on CloseDownDevices."
    
    This reverts commit 9b62355847ce7df1ca144b4ebc9ff5c7286b573d.
    
    This wasn't supposed to be pushed either.

diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c
index 7723c74..87ee072 100644
--- a/xkb/xkbInit.c
+++ b/xkb/xkbInit.c
@@ -291,9 +291,6 @@ XkbDeleteRulesDflts()
     XkbVariantDflt = NULL;
     _XkbFree(XkbOptionsDflt);
     XkbOptionsDflt = NULL;
-
-    XkbFreeKeyboard(xkb_cached_map, XkbAllComponentsMask, True);
-    xkb_cached_map = NULL;
 }
 
 /***====================================================================***/

commit b50932d998f9fe81d01a8cd22d9613aaf9136985
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Jul 29 13:14:02 2008 +0930

    Revert "xfree86: AllowEmptyInput is now enabled by default if hotplugging is enabled."
    
    This reverts commit 153c6d48c655b3eca9a33b7487b238b42a4a3f8e.
    
    How did this one end up on the branch? Sure as hell wasn't supposed to be
    pushed.

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 2916402..3c29497 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -1081,9 +1081,9 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
 	xf86Info.aiglxFrom = X_CONFIG;
     }
 
-    /* AllowEmptyInput is automatically true if we're hotplugging */
-    xf86Info.allowEmptyInput = (xf86Info.autoAddDevices && xf86Info.autoEnableDevices);
-    xf86GetOptValBool(FlagOptions, FLAG_ALLOW_EMPTY_INPUT, &xf86Info.allowEmptyInput);
+    xf86Info.allowEmptyInput = FALSE;
+    if (xf86GetOptValBool(FlagOptions, FLAG_ALLOW_EMPTY_INPUT, &value))
+        xf86Info.allowEmptyInput = TRUE;
 
     xf86Info.useDefaultFontPath = TRUE;
     xf86Info.useDefaultFontPathFrom = X_DEFAULT;
@@ -1841,7 +1841,9 @@ configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen)
     indp = xnfalloc(sizeof(IDevPtr));
     *indp = NULL;
     servlayoutp->inputs = indp;
-
+    if (!xf86Info.allowEmptyInput && !checkCoreInputDevices(servlayoutp, TRUE))
+	return FALSE;
+    
     return TRUE;
 }
 
diff --git a/hw/xfree86/doc/man/xorg.conf.man.pre b/hw/xfree86/doc/man/xorg.conf.man.pre
index 94baf13..3ff5776 100644
--- a/hw/xfree86/doc/man/xorg.conf.man.pre
+++ b/hw/xfree86/doc/man/xorg.conf.man.pre
@@ -672,21 +672,6 @@ default.
 .BI "Option \*qIgnoreABI\*q \*q" boolean \*q
 Allow modules built for a different, potentially incompatible version of
 the X server to load. Disabled by default.
-.TP 7
-.BI "Option \*qAllowEmptyInput\*q \*q" boolean \*q
-If enabled, don't add the standard keyboard and mouse drivers, if there are no
-input devices in the config file.  Enabled by default if AutoAddDevices and
-AutoEnableDevices is enabled, otherwise disabled.
-.TP 7
-.BI "Option \*qAutoAddDevices\*q \*q" boolean \*q
-If this option is disabled, then no devices will be added from HAL events.
-Enabled by default.
-.TP 7
-.BI "Option \*qAutoEnableDevices\*q \*q" boolean \*q
-If this option is disabled, then the devices will be added (and the
-DevicePresenceNotify event sent), but not enabled, thus leaving policy up
-to the client.
-Enabled by default.
 .SH "MODULE SECTION"
 The
 .B Module

commit 48a9996192613ab259549cdb7c8735d2fb31ed78
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Jul 29 10:00:01 2008 +0930

    Xi: ChangeDeviceControl presence events should set the appropriate devchange.
    
    Requires inputproto 1.4.4 or higher.
    (cherry picked from commit 591ef3c047ab3597fef9d687205e99c254ff2040)
    
    Modified to use the numeric value of DeviceControlChanged instead of the
    define, just so we don't bork out if someone rebuilds without updating
    inputproto. This is a released server, after all.

diff --git a/Xi/chgdctl.c b/Xi/chgdctl.c
index 9676fb7..38793c9 100644
--- a/Xi/chgdctl.c
+++ b/Xi/chgdctl.c
@@ -261,7 +261,7 @@ out:
     if (ret == Success) {
         dpn.type = DevicePresenceNotify;
         dpn.time = currentTime.milliseconds;
-        dpn.devchange = 1;
+        dpn.devchange = 5; /* DeviceControlChanged */
         dpn.deviceid = dev->id;
         dpn.control = stuff->control;
         SendEventToAllWindows(dev, DevicePresenceNotifyMask,

commit 153c6d48c655b3eca9a33b7487b238b42a4a3f8e
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Jul 3 15:05:14 2008 +0930

    xfree86: AllowEmptyInput is now enabled by default if hotplugging is enabled.
    
    Remove AEI check from configImpliedLayout as the setting isn't actually parsed
    at this point anyway (written by Sasha Hlusiak).
    
    Resurrect checkInput() and check for devices there if AEI is false (this also
    creates the default devices if required).
    
    Set AllowEmptyInput to enabled by default if hotplugging is enabled.
    (cherry picked from commit bea743f3d629bafdc301f40e9c0bc11382dfe8bc)
    
    Conflicts:
    
    	hw/xfree86/common/xf86Config.c
    	hw/xfree86/doc/man/xorg.conf.man.pre

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 3c29497..2916402 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -1081,9 +1081,9 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
 	xf86Info.aiglxFrom = X_CONFIG;
     }
 
-    xf86Info.allowEmptyInput = FALSE;
-    if (xf86GetOptValBool(FlagOptions, FLAG_ALLOW_EMPTY_INPUT, &value))
-        xf86Info.allowEmptyInput = TRUE;
+    /* AllowEmptyInput is automatically true if we're hotplugging */
+    xf86Info.allowEmptyInput = (xf86Info.autoAddDevices && xf86Info.autoEnableDevices);
+    xf86GetOptValBool(FlagOptions, FLAG_ALLOW_EMPTY_INPUT, &xf86Info.allowEmptyInput);
 
     xf86Info.useDefaultFontPath = TRUE;
     xf86Info.useDefaultFontPathFrom = X_DEFAULT;
@@ -1841,9 +1841,7 @@ configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen)
     indp = xnfalloc(sizeof(IDevPtr));
     *indp = NULL;
     servlayoutp->inputs = indp;
-    if (!xf86Info.allowEmptyInput && !checkCoreInputDevices(servlayoutp, TRUE))
-	return FALSE;
-    
+
     return TRUE;
 }
 
diff --git a/hw/xfree86/doc/man/xorg.conf.man.pre b/hw/xfree86/doc/man/xorg.conf.man.pre
index 3ff5776..94baf13 100644
--- a/hw/xfree86/doc/man/xorg.conf.man.pre
+++ b/hw/xfree86/doc/man/xorg.conf.man.pre
@@ -672,6 +672,21 @@ default.
 .BI "Option \*qIgnoreABI\*q \*q" boolean \*q
 Allow modules built for a different, potentially incompatible version of
 the X server to load. Disabled by default.
+.TP 7
+.BI "Option \*qAllowEmptyInput\*q \*q" boolean \*q
+If enabled, don't add the standard keyboard and mouse drivers, if there are no
+input devices in the config file.  Enabled by default if AutoAddDevices and
+AutoEnableDevices is enabled, otherwise disabled.
+.TP 7
+.BI "Option \*qAutoAddDevices\*q \*q" boolean \*q
+If this option is disabled, then no devices will be added from HAL events.
+Enabled by default.
+.TP 7
+.BI "Option \*qAutoEnableDevices\*q \*q" boolean \*q
+If this option is disabled, then the devices will be added (and the
+DevicePresenceNotify event sent), but not enabled, thus leaving policy up
+to the client.
+Enabled by default.
 .SH "MODULE SECTION"
 The
 .B Module

commit 9b62355847ce7df1ca144b4ebc9ff5c7286b573d
Author: Peter Hutterer <peter@cs.unisa.edu.au>
Date:   Wed Jun 4 11:10:11 2008 +0930

    xkb: reset xkb_cached_map on CloseDownDevices.
    
    Could lead to some invalid pointers in the second server generation.
    (cherry picked from commit ff3adf3e564d94fea18e48f966de40a7ded1279e)

diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c
index 87ee072..7723c74 100644
--- a/xkb/xkbInit.c
+++ b/xkb/xkbInit.c
@@ -291,6 +291,9 @@ XkbDeleteRulesDflts()
     XkbVariantDflt = NULL;
     _XkbFree(XkbOptionsDflt);
     XkbOptionsDflt = NULL;
+
+    XkbFreeKeyboard(xkb_cached_map, XkbAllComponentsMask, True);
+    xkb_cached_map = NULL;
 }
 
 /***====================================================================***/

commit 7cdef0d6fc3ec6705a61014b741a4c24dc60973b
Author: Peter Hutterer <peter@cs.unisa.edu.au>
Date:   Sun Jun 1 15:20:42 2008 +0930

    xkb: delete default rules when devices are closed.
    
    We only have one set of default rules options in xkb. When the second keyboard
    is brought up with Xkb options specified, these new options overwrite the old.
    In future server generations, the rules used for the VCK are a mixture of the
    default ones and ones previously specified for other keyboards. Simply
    resetting the xkb default rules to NULL avoids this issue.
    
    Reproducable by setting XkbLayout "de" and XkbVariant "nodeadkeys". In the
    second server generation, the VCK has "us(nodeadkeys)". This again produces a
    SIGABRT when the first key is hit.
    
    I could not figure out why the SIGABRT happens. This patch is avoiding the
    issue rather than fixing it.
    (cherry picked from commit 5a3d06b8f42473cea3741dc722a775deaa2b73f6)

diff --git a/dix/devices.c b/dix/devices.c
index f6f3c8e..c02b7ae 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -634,6 +634,9 @@ CloseDownDevices(void)
     inputInfo.off_devices = NULL;
     inputInfo.keyboard = NULL;
     inputInfo.pointer = NULL;
+#ifdef XKB
+    XkbDeleteRulesDflts();
+#endif
 }
 
 /**
diff --git a/include/xkbsrv.h b/include/xkbsrv.h
index acf3bb0..b52eb65 100644
--- a/include/xkbsrv.h
+++ b/include/xkbsrv.h
@@ -895,6 +895,10 @@ extern	void	XkbSetRulesDflts(
 	char *			/* options */
 );
 
+extern	void	XkbDeleteRulesDflts(
+	void
+);
+
 extern	void	XkbInitDevice(
 	DeviceIntPtr 	/* pXDev */
 );
diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c
index c0867ad..87ee072 100644
--- a/xkb/xkbInit.c
+++ b/xkb/xkbInit.c
@@ -278,6 +278,21 @@ XkbSetRulesDflts(char *rulesFile,char *model,char *layout,
     return;
 }
 
+void
+XkbDeleteRulesDflts()
+{
+    _XkbFree(XkbRulesFile);
+    XkbRulesFile = NULL;
+    _XkbFree(XkbModelDflt);
+    XkbModelDflt = NULL;
+    _XkbFree(XkbLayoutDflt);
+    XkbLayoutDflt = NULL;
+    _XkbFree(XkbVariantDflt);
+    XkbVariantDflt = NULL;
+    _XkbFree(XkbOptionsDflt);
+    XkbOptionsDflt = NULL;
+}
+
 /***====================================================================***/
 
 #if defined(luna)

commit 5903b4c749c1136d0f3e91d5e6321b08c31da4bf
Author: Peter Hutterer <peter@cs.unisa.edu.au>
Date:   Mon Jun 2 11:04:41 2008 +0930

    kdrive: don't post motion event if there was no motion. #16179
    
    Based on the patch by Tomas Janousek.
    Backported from master to server-1.4.
    
    X.Org Bug 16179 <http://bugs.freedesktop.org/show_bug.cgi?id=16179>
    (cherry picked from commit 26e7e69ab893d1f2b35213250ada40ec90944f62)

diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c
index 6c247c1..d53a0d9 100644
--- a/hw/kdrive/src/kinput.c
+++ b/hw/kdrive/src/kinput.c
@@ -2066,7 +2066,7 @@ KdEnqueuePointerEvent(KdPointerInfo *pi, unsigned long flags, int rx, int ry,
     int           (*matrix)[3] = kdPointerMatrix.matrix;
     unsigned long button;
     int           n;
-    int           dixflags;
+    int           dixflags = 0;
 
     if (!pi)
 	return;
@@ -2097,11 +2097,15 @@ KdEnqueuePointerEvent(KdPointerInfo *pi, unsigned long flags, int rx, int ry,
     z = rz;
 
     if (flags & KD_MOUSE_DELTA)
-        dixflags = POINTER_RELATIVE & POINTER_ACCELERATE;
-    else
-        dixflags = POINTER_ABSOLUTE;
-
-    _KdEnqueuePointerEvent(pi, MotionNotify, x, y, z, 0, dixflags, FALSE);
+    {
+        if (x || y || z)
+            dixflags = POINTER_RELATIVE | POINTER_ACCELERATE;
+    } else if ((pi->dixdev->valuator) && (x != pi->dixdev->valuator->lastx ||
+                                          y != pi->dixdev->valuator->lasty))
+            dixflags = POINTER_ABSOLUTE;
+
+    if (dixflags)
+        _KdEnqueuePointerEvent(pi, MotionNotify, x, y, z, 0, dixflags, FALSE);
 
     buttons = flags;
 


Reply to: