Updating branch refs/heads/xfce-4.8
         to 6bf6121de8f8d0564d0be9354f7e0e93e3629549 (commit)
       from 5c72bb56c94d836640088d8474107650eebf3eaa (commit)

commit 6bf6121de8f8d0564d0be9354f7e0e93e3629549
Author: Amcnabb <amcnabb-x...@mcnabbs.org>
Date:   Thu Mar 31 23:22:31 2011 +0200

    Fix expiration of sticky, slow, bounce and mouse keys (bug #6305).

 xfce4-settings-helper/accessibility.c |   29 ++++++++++++++++++++++++++---
 1 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/xfce4-settings-helper/accessibility.c 
b/xfce4-settings-helper/accessibility.c
index a559607..51bb32e 100644
--- a/xfce4-settings-helper/accessibility.c
+++ b/xfce4-settings-helper/accessibility.c
@@ -186,6 +186,13 @@ xfce_accessibility_helper_set_xkb (XfceAccessibilityHelper 
*helper,
         /* we always change this, so add it to the mask */
         SET_FLAG (mask, XkbControlsEnabledMask);
         
+        /* if setting sticky keys, we set expiration too */
+        if (HAS_FLAG (mask, XkbStickyKeysMask) ||
+                HAS_FLAG (mask, XkbSlowKeysMask) ||
+                HAS_FLAG (mask, XkbBounceKeysMask) ||
+                HAS_FLAG (mask, XkbMouseKeysMask))
+            SET_FLAG (mask, XkbAccessXTimeoutMask);
+
         /* add the mouse keys values mask if needed */
         if (HAS_FLAG (mask, XkbMouseKeysMask))
             SET_FLAG (mask, XkbMouseKeysAccelMask);
@@ -199,6 +206,8 @@ xfce_accessibility_helper_set_xkb (XfceAccessibilityHelper 
*helper,
             if (xfconf_channel_get_bool (helper->channel, "/StickyKeys", 
FALSE))
             {
                 SET_FLAG (xkb->ctrls->enabled_ctrls, XkbStickyKeysMask);
+                UNSET_FLAG (xkb->ctrls->axt_ctrls_mask, XkbStickyKeysMask);
+                UNSET_FLAG (xkb->ctrls->axt_ctrls_values, XkbStickyKeysMask);
 
                 if (xfconf_channel_get_bool (helper->channel, 
"/StickyKeys/LatchToLock", FALSE))
                     SET_FLAG (xkb->ctrls->ax_options, XkbAX_LatchToLockMask);
@@ -213,6 +222,8 @@ xfce_accessibility_helper_set_xkb (XfceAccessibilityHelper 
*helper,
             else
             {
                 UNSET_FLAG (xkb->ctrls->enabled_ctrls, XkbStickyKeysMask);
+                SET_FLAG (xkb->ctrls->axt_ctrls_mask, XkbStickyKeysMask);
+                UNSET_FLAG (xkb->ctrls->axt_ctrls_values, XkbStickyKeysMask);
             }
         }
         
@@ -222,13 +233,17 @@ xfce_accessibility_helper_set_xkb 
(XfceAccessibilityHelper *helper,
             if (xfconf_channel_get_bool (helper->channel, "/SlowKeys", FALSE))
             {
                 SET_FLAG (xkb->ctrls->enabled_ctrls, XkbSlowKeysMask);
-                
+                UNSET_FLAG (xkb->ctrls->axt_ctrls_mask, XkbSlowKeysMask);
+                UNSET_FLAG (xkb->ctrls->axt_ctrls_values, XkbSlowKeysMask);
+
                 delay = xfconf_channel_get_int (helper->channel, 
"/SlowKeys/Delay", 100);
                 xkb->ctrls->slow_keys_delay = CLAMP (delay, 1, G_MAXUSHORT);
             }
             else
             {
                 UNSET_FLAG (xkb->ctrls->enabled_ctrls, XkbSlowKeysMask);
+                SET_FLAG (xkb->ctrls->axt_ctrls_mask, XkbSlowKeysMask);
+                UNSET_FLAG (xkb->ctrls->axt_ctrls_values, XkbSlowKeysMask);
             }
         }
         
@@ -238,13 +253,17 @@ xfce_accessibility_helper_set_xkb 
(XfceAccessibilityHelper *helper,
             if (xfconf_channel_get_bool (helper->channel, "/BounceKeys", 
FALSE))
             {
                 SET_FLAG (xkb->ctrls->enabled_ctrls, XkbBounceKeysMask);
-                
+                UNSET_FLAG (xkb->ctrls->axt_ctrls_mask, XkbBounceKeysMask);
+                UNSET_FLAG (xkb->ctrls->axt_ctrls_values, XkbBounceKeysMask);
+
                 delay = xfconf_channel_get_int (helper->channel, 
"/BounceKeys/Delay", 100);
                 xkb->ctrls->debounce_delay = CLAMP (delay, 1, G_MAXUSHORT);
             }
             else
             {
                 UNSET_FLAG (xkb->ctrls->enabled_ctrls, XkbBounceKeysMask);
+                SET_FLAG (xkb->ctrls->axt_ctrls_mask, XkbBounceKeysMask);
+                UNSET_FLAG (xkb->ctrls->axt_ctrls_values, XkbBounceKeysMask);
             }
         }
         
@@ -254,7 +273,9 @@ xfce_accessibility_helper_set_xkb (XfceAccessibilityHelper 
*helper,
             if (xfconf_channel_get_bool (helper->channel, "/MouseKeys", FALSE))
             {
                 SET_FLAG (xkb->ctrls->enabled_ctrls, XkbMouseKeysMask);
-                
+                UNSET_FLAG (xkb->ctrls->axt_ctrls_mask, XkbMouseKeysMask);
+                UNSET_FLAG (xkb->ctrls->axt_ctrls_values, XkbMouseKeysMask);
+
                 /* get values */
                 delay = xfconf_channel_get_int (helper->channel, 
"/MouseKeys/Delay", 160);
                 interval = xfconf_channel_get_int (helper->channel, 
"/MouseKeys/Interval", 20);
@@ -282,6 +303,8 @@ xfce_accessibility_helper_set_xkb (XfceAccessibilityHelper 
*helper,
             else
             {
                 UNSET_FLAG (xkb->ctrls->enabled_ctrls, XkbMouseKeysMask);
+                SET_FLAG (xkb->ctrls->axt_ctrls_mask, XkbMouseKeysMask);
+                UNSET_FLAG (xkb->ctrls->axt_ctrls_values, XkbMouseKeysMask);
                 UNSET_FLAG (mask, XkbMouseKeysAccelMask);
             }
         }
_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to