File workarounds-any-super-key-shows-main-menu.diff of Package compiz-fusion-plugins-main
--- a/metadata/workarounds.xml.in
+++ b/metadata/workarounds.xml.in
@@ -66,6 +66,16 @@
<default>any</default>
</option>
</subgroup>
+ <option name="extra0_main_menu_key" type="key">
+ <_short>Show Main Menu</_short>
+ <_long>Show the main menu</_long>
+ <default>Super_L</default>
+ </option>
+ <option name="extra1_main_menu_key" type="key">
+ <_short>Show Main Menu</_short>
+ <_long>Show the main menu</_long>
+ <default>Super_R</default>
+ </option>
</display>
<screen>
</screen>
--- a/src/workarounds/workarounds.c
+++ b/src/workarounds/workarounds.c
@@ -90,6 +90,28 @@ typedef struct _WorkaroundsWindow {
GET_WORKAROUNDS_SCREEN (w->screen, \
GET_WORKAROUNDS_DISPLAY (w->screen->display)))
+static Bool
+workaroundsMainMenu (CompDisplay *d,
+ CompAction *action,
+ CompActionState state,
+ CompOption *option,
+ int nOption)
+{
+ CompScreen *s;
+ Window xid;
+ unsigned int time;
+
+ xid = getIntOptionNamed (option, nOption, "root", 0);
+ time = getIntOptionNamed (option, nOption, "time", CurrentTime);
+
+ s = findScreenAtDisplay (d, xid);
+ if (s && !s->maxGrab)
+ toolkitAction (s, s->display->toolkitActionMainMenuAtom, time,
+ s->root.id, 0, 0, 0);
+
+ return TRUE;
+}
+
static void
workaroundsAddToFullscreenList (CompWindow *w)
{
@@ -674,7 +696,9 @@ workaroundsInitDisplay (CompPlugin *plugin, CompDisplay *d)
workaroundsDisplayOptionChanged);
workaroundsSetAiglxFragmentFixNotify (d, workaroundsDisplayOptionChanged);
workaroundsSetFglrxXglFixNotify (d, workaroundsDisplayOptionChanged);
-
+
+ workaroundsSetExtra0MainMenuKeyInitiate (d, workaroundsMainMenu);
+ workaroundsSetExtra1MainMenuKeyInitiate (d, workaroundsMainMenu);
d->base.privates[displayPrivateIndex].ptr = wd;