[Sugar-devel] [PATCH] sugar-session: disable Metacity mouse button modifiers (OLPC#11781)

Daniel Drake dsd at laptop.org
Thu Jun 7 11:28:35 EDT 2012


Metacity provides "mouse button modifier" functionality which lets
you drag activity windows around the screen, amongst other things.
This is something we want to disable, similar to how we disable
metacity's key bindings.

In recent metacity releases, Alt is the default mouse button modifier.
We especially want to disable this functionality in this case because
Sugar uses Alt for other things, such as launching a new activity
instance (rather than a journal entry) from the home screen.

Signed-off-by: Daniel Drake <dsd at laptop.org>
---
 bin/sugar-session |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/bin/sugar-session b/bin/sugar-session
index 40c9db7..e9c8d50 100755
--- a/bin/sugar-session
+++ b/bin/sugar-session
@@ -181,6 +181,10 @@ def setup_window_manager():
             shell=True):
         logging.warning('Can not disable metacity keybindings')
 
+    if subprocess.call('metacity-message disable-mouse-button-modifiers',
+            shell=True):
+        logging.warning('Can not disable metacity mouse button modifiers')
+
 def bootstrap():
     setup_window_manager()
 
-- 
1.7.10.2



More information about the Sugar-devel mailing list