[mate-settings-daemon] 01/02: debian/patches: Add debian/patches/1001_fix-numlock-cpu-usage.patch. Prevent m-s-d from causing high CPU loads if the user repetitively toggles the NUMLOCK key while being connected via a remote session (NX, X2Go, VNC, xrdp, etc.) or sometimes also in a local X.org session. (Closes: #780226, LP:1364111).

Mike Gabriel sunweaver at debian.org
Thu Mar 12 03:42:48 UTC 2015


This is an automated email from the git hooks/post-receive script.

sunweaver pushed a commit to branch master
in repository mate-settings-daemon.

commit 3dfa2c55dc5a5d7cafc02e1cd55338ce5edf5902
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Tue Mar 10 20:14:53 2015 +0100

    debian/patches: Add debian/patches/1001_fix-numlock-cpu-usage.patch. Prevent m-s-d from causing high CPU loads if the user repetitively toggles the NUMLOCK key while being connected via a remote session (NX, X2Go, VNC, xrdp, etc.) or sometimes also in a local X.org session. (Closes: #780226, LP:1364111).
---
 debian/patches/1001_fix-numlock-cpu-usage.patch | 35 +++++++++++++++++++++++++
 debian/patches/series                           |  1 +
 2 files changed, 36 insertions(+)

diff --git a/debian/patches/1001_fix-numlock-cpu-usage.patch b/debian/patches/1001_fix-numlock-cpu-usage.patch
new file mode 100644
index 0000000..651b59b
--- /dev/null
+++ b/debian/patches/1001_fix-numlock-cpu-usage.patch
@@ -0,0 +1,35 @@
+Author: Nilesh Govindrajan (https://github.com/nilesh)
+Description: Prevent nxagent/xrdp/xvnc from causing high CPU loads on toggling NUMLOCK
+Origin: https://github.com/mate-desktop/mate-settings-daemon/issues/57#issuecomment-73353036
+
+--- a/plugins/keyboard/msd-keyboard-manager.c    2015-02-07 12:17:03.372168487 +0530
++++ b/plugins/keyboard/msd-keyboard-manager.c 2015-02-07 10:57:10.936047797 +0530
+@@ -267,10 +267,6 @@
+         bell_volume   = (volume_string && !strcmp (volume_string, "on")) ? 50 : 0;
+         g_free (volume_string);
+
+-#ifdef HAVE_X11_EXTENSIONS_XKB_H
+-        rnumlock      = g_settings_get_boolean  (settings, KEY_NUMLOCK_REMEMBER);
+-#endif /* HAVE_X11_EXTENSIONS_XKB_H */
+-
+         gdk_error_trap_push ();
+         if (repeat) {
+                 gboolean rate_set = FALSE;
+@@ -306,9 +302,13 @@
+                                 &kbdcontrol);
+
+ #ifdef HAVE_X11_EXTENSIONS_XKB_H
+-        if (manager->priv->have_xkb && rnumlock) {
+-                numlock_set_xkb_state (numlock_get_settings_state (settings));
+-        }
++        rnumlock      = g_settings_get_boolean  (settings, KEY_NUMLOCK_REMEMBER);
++
++       if(rnumlock == 0 || key == NULL) {
++           if (manager->priv->have_xkb && rnumlock) {
++                   numlock_set_xkb_state (numlock_get_settings_state (settings));
++           }
++       }
+ #endif /* HAVE_X11_EXTENSIONS_XKB_H */
+
+         XSync (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), FALSE);
+
diff --git a/debian/patches/series b/debian/patches/series
index 911c985..9a8ddbb 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 0001_prefer-gcalculator-for-media-keys.patch
 0002_fix-a11y-keyboard-dialog-segfaults.patch
+1001_fix-numlock-cpu-usage.patch
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mate/mate-settings-daemon.git



More information about the pkg-mate-commits mailing list