[
Thread Prev][
Thread Next] >
Date Index
>
Thread Index
[wmx] More cool menu patches
Lasse Rasinen -
Thu Jan 28 14:15:17 1999
The first patch makes keyboard client menu move the pointer to the selected
client. It's way cool and you can (almost) forget Alt-Tab or whatever you
prefer.
--- Menu.C.new Thu Jan 21 16:12:39 1999
+++ Menu.C Thu Jan 28 14:29:33 1999
@@ -470,6 +473,9 @@
else cl->mapRaised();
cl->ensureVisible();
}
+
+ if (CONFIG_WANT_KEYBOARD_MENU && e->type == KeyPress)
+ cl->activateAndWarp();
}
--m_nHidden; // just in case
The second patch creates a new configure option CONFIG_COMMAND_MENU_KEY
and renames CONFIG_MENU_KEY to CONFIG_CLIENT_MENU_KEY, and adds
appropriate support for keyboard command menu. With this and the previous
patch, the mouse becomes almost obsolete.
--- ../foo/wmx-5/Buttons.C Wed Jan 13 12:28:43 1999
+++ ./Buttons.C Wed Jan 27 02:40:57 1999
@@ -185,9 +185,14 @@
if (c) c->setSticky(!(c->isSticky()));
break;
- case CONFIG_MENU_KEY:
+ case CONFIG_CLIENT_MENU_KEY:
if (CONFIG_WANT_KEYBOARD_MENU) {
ClientMenu menu(this, (XEvent *)ev);
+ break;
+ }
+ case CONFIG_COMMAND_MENU_KEY:
+ if (CONFIG_WANT_KEYBOARD_MENU) {
+ CommandMenu menu(this, (XEvent *)ev);
break;
}
--- ../foo/wmx-5/Client.C Wed Jan 13 12:28:43 1999
+++ ./Client.C Wed Jan 27 02:41:39 1999
@@ -172,7 +172,7 @@
CONFIG_STICKY_KEY
#if CONFIG_WANT_KEYBOARD_MENU
- , CONFIG_MENU_KEY
+ , CONFIG_CLIENT_MENU_KEY,CONFIG_COMMAND_MENU_KEY
#endif
};
--- ../foo/wmx-5/Config.h Thu Jan 28 15:12:38 1999
+++ Config.h Thu Jan 28 15:12:31 1999
@@ -196,7 +196,8 @@
// If WANT_KEYBOARD_MENU is True, then the MENU_KEY, when pressed with
// the modifier, will call up a client menu with keyboard navigation
#define CONFIG_WANT_KEYBOARD_MENU True
-#define CONFIG_MENU_KEY XK_Menu
+#define CONFIG_CLIENT_MENU_KEY XK_Menu
+#define CONFIG_COMMAND_MENU_KEY XK_Multi_key
// these are for navigating on the menu; they don't require a modifier
#define CONFIG_MENU_UP_KEY XK_Up
#define CONFIG_MENU_DOWN_KEY XK_Down
Next: