diff options
author | Daniel Drake <dsd@laptop.org> | 2012-06-07 15:28:35 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@schampijer.de> | 2012-06-15 07:42:59 (GMT) |
commit | 7a10229ee66d56c036e1c7bee5036b3cbba835e3 (patch) | |
tree | af9e470f56b3592569b29fa2f0bd167ef53d4c2b | |
parent | 11d3207f5101ec88b707931749818802552e76ba (diff) |
sugar-session: disable Metacity mouse button modifiers, OLPC #11781
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.
This patch depends on the metacity commit 86fd12cbf06f693405650b9d6f7c6234757cc354
which adds a new 'metacity-message' option to "enable-mouse-button-modifiers"
and to "disable-mouse-button-modifiers", in both cases it has to be set to
true. For example, this patch has been added to metacity-2.34.3-2.fc17 in
Fedora. Running Sugar with a metacity version that does not have this patch
does work fine, we exit gracefully and display a warning that the
"disable-mouse-button-modifiers" message could not be applied.
There are two ways to verify this:
- open the Terminal Activity, hold the alt-key down and try to
click-drag the window ---> dragging the window around should not
be possible
- hold the alt key down and start an Activity from the home
screen ---> a new instance should be created rather than resuming
an old one
Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
-rwxr-xr-x | bin/sugar-session | 4 |
1 files changed, 4 insertions, 0 deletions
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() |