[Xfce4-commits] <xfwm4:master> Reloading settings on keys-changed signal is a huge overhead and complete nonsense (fix bug #5964)

Olivier Fourdan noreply at xfce.org
Tue Nov 24 15:48:05 CET 2009


Updating branch refs/heads/master
         to 0e6c8a5177563db8dec53416a5a077691ac40bfc (commit)
       from 6f2324af39dee06d680d38692e6522c56cef6cef (commit)

commit 0e6c8a5177563db8dec53416a5a077691ac40bfc
Author: Olivier Fourdan <fourdan at xfce.org>
Date:   Mon Nov 23 15:45:12 2009 +0100

    Reloading settings on keys-changed signal is a huge overhead and complete nonsense (fix bug #5964)

 src/settings.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/settings.c b/src/settings.c
index 0969faf..0e5bd47 100644
--- a/src/settings.c
+++ b/src/settings.c
@@ -1353,8 +1353,15 @@ cb_xfwm4_channel_property_changed(XfconfChannel *channel, const gchar *property_
 static void
 cb_keys_changed (GdkKeymap *keymap, ScreenInfo *screen_info)
 {
+    /* Recompute modifiers mask in case it changed */
     initModifiers (myScreenGetXDisplay (screen_info));
-    reloadSettings (screen_info->display_info, UPDATE_BUTTON_GRABS);
+
+    /* Ungrab/regrab shortcuts */
+    myScreenUngrabKeys (screen_info);
+    myScreenGrabKeys (screen_info);
+
+    /* Uupdate all grabs for mouse buttons */
+    clientUpdateAllFrames (screen_info, UPDATE_BUTTON_GRABS);
 }
 
 static void



More information about the Xfce4-commits mailing list