File bnc963119-sle-fix-menu-navigation.patch of Package gnome-shell.1952
Index: gnome-shell-3.10.4/js/ui/panelMenu.js
===================================================================
--- gnome-shell-3.10.4.orig/js/ui/panelMenu.js
+++ gnome-shell-3.10.4/js/ui/panelMenu.js
@@ -13,6 +13,8 @@ const Main = imports.ui.main;
const Params = imports.misc.params;
const PopupMenu = imports.ui.popupMenu;
+const SLEClassicExt = imports.ui.SLEClassicExt;
+
const ButtonBox = new Lang.Class({
Name: 'ButtonBox',
@@ -147,19 +149,38 @@ const Button = new Lang.Class({
return false;
let symbol = event.get_key_symbol();
+
if (symbol == Clutter.KEY_space || symbol == Clutter.KEY_Return) {
this.menu.toggle();
return true;
- } else if (symbol == Clutter.KEY_Escape && this.menu.isOpen) {
+ }
+
+ if (symbol == Clutter.KEY_Escape && this.menu.isOpen) {
this.menu.close();
return true;
- } else if (symbol == Clutter.KEY_Down) {
+ }
+
+ // different modes have different navigation keys:
+ // For SLE-Classic: it's the UP key;
+ // For other sessions: it's the Down Key, this is the upstream default
+ //
+ // NOTE: this is a quick hack for bnc#963119, a more proper solution is
+ // proposed in the report
+ if (( !SLEClassicExt.isSLEClassicMode() ) && symbol == Clutter.KEY_Down) {
if (!this.menu.isOpen)
this.menu.toggle();
this.menu.actor.navigate_focus(this.actor, Gtk.DirectionType.DOWN, false);
return true;
- } else
- return false;
+ }
+ if (SLEClassicExt.isSLEClassicMode() && symbol == Clutter.KEY_Up) {
+ if (!this.menu.isOpen)
+ this.menu.toggle();
+ this.menu.actor.navigate_focus(this.actor, Gtk.DirectionType.UP, false);
+ return true;
+ }
+
+ // unhandled keys
+ return false;
},
_onVisibilityChanged: function() {