summaryrefslogtreecommitdiffstats
path: root/opensuse/core/tdebase/dont-always-start-kaccess.diff
diff options
context:
space:
mode:
authorPawel "l0ner" Soltys <pwslts@gmail.com>2012-02-02 14:23:19 +0100
committerPawel "l0ner" Soltys <pwslts@gmail.com>2012-02-02 14:23:19 +0100
commited2b6731ab373ac335fde87af177351facbd2f15 (patch)
tree81cc3d45c8c30aceadb4f597be819dc2863a3a3a /opensuse/core/tdebase/dont-always-start-kaccess.diff
parent021036598a306d8cf7204d6d62ff090278f7ecf1 (diff)
parent5f93960dbb108c2c6d09964d1ee0d2e390b1498c (diff)
downloadtde-packaging-ed2b6731ab373ac335fde87af177351facbd2f15.tar.gz
tde-packaging-ed2b6731ab373ac335fde87af177351facbd2f15.zip
Merge branch 'master' of http://scm.trinitydesktop.org/scm/git/tde-packaging
Diffstat (limited to 'opensuse/core/tdebase/dont-always-start-kaccess.diff')
-rw-r--r--opensuse/core/tdebase/dont-always-start-kaccess.diff66
1 files changed, 66 insertions, 0 deletions
diff --git a/opensuse/core/tdebase/dont-always-start-kaccess.diff b/opensuse/core/tdebase/dont-always-start-kaccess.diff
new file mode 100644
index 000000000..f50747274
--- /dev/null
+++ b/opensuse/core/tdebase/dont-always-start-kaccess.diff
@@ -0,0 +1,66 @@
+Index: kcontrol/access/kcmaccess.cpp
+===================================================================
+--- kcontrol/access/kcmaccess.cpp.orig
++++ kcontrol/access/kcmaccess.cpp
+@@ -103,10 +103,57 @@ void ExtendedIntNumInput::slotSliderValu
+
+ static bool needToRunKAccessDaemon( KConfig *config )
+ {
+- // We always start the KAccess Daemon, if it is not needed,
+- // it will terminate itself after configuring the AccessX
+- // features.
+- return true;
++ KConfigGroup bell( config, "Bell" );
++
++ if (!bell.readBoolEntry("SystemBell", true))
++ return true;
++ if (bell.readBoolEntry("ArtsBell", false))
++ return true;
++ if (bell.readBoolEntry("VisibleBell", false))
++ return true;
++
++ KConfigGroup keyboard( config, "Keyboard" );
++
++ if (keyboard.readBoolEntry("StickyKeys", false))
++ return true;
++ if (keyboard.readBoolEntry("SlowKeys", false))
++ return true;
++ if (keyboard.readBoolEntry("BounceKeys", false))
++ return true;
++ if (keyboard.readBoolEntry("Gestures", true))
++ return true;
++ // Find out whether the gestures are activated by default in the X configuration or not.
++ int major = XkbMajorVersion;
++ int minor = XkbMinorVersion;
++ if (XkbLibraryVersion(&major, &minor))
++ {
++ int opcode_rtrn;
++ int error_rtrn;
++ int xkb_opcode;
++ if (XkbQueryExtension(qt_xdisplay(), &opcode_rtrn, &xkb_opcode, &error_rtrn,
++ &major, &minor))
++ {
++ if(XkbDescPtr xkbdesc = XkbGetMap(qt_xdisplay(), 0, XkbUseCoreKbd))
++ {
++ if(XkbGetControls(qt_xdisplay(), XkbAllControlsMask/*XkbAccessXKeysMask*/, xkbdesc ) == Success )
++ {
++ if(xkbdesc->ctrls->enabled_ctrls & XkbAccessXKeysMask)
++ {
++ XkbFreeClientMap(xkbdesc,0,True);
++ return true;
++ }
++ }
++ XkbFreeClientMap(xkbdesc,0,True);
++ }
++ }
++ }
++
++ KConfigGroup mouse( config, "Mouse" );
++
++ if (mouse.readBoolEntry("MouseKeys", false))
++ return true;
++
++ return false; // don't need it
+ }
+
+ QString mouseKeysShortcut (Display *display) {