diff options
author | Matt Keadle <mkeadle@gentoo.org> | 2002-11-22 01:27:36 +0000 |
---|---|---|
committer | Matt Keadle <mkeadle@gentoo.org> | 2002-11-22 01:27:36 +0000 |
commit | c1fb22df4a89cdf3a4506804b8b3ac5928db5c75 (patch) | |
tree | 381a06ea02dbc1c132c7fe97102760af5e8c86e6 | |
parent | set -ppc -sparc -sparc64 -alpha in keywords (diff) | |
download | historical-c1fb22df4a89cdf3a4506804b8b3ac5928db5c75.tar.gz historical-c1fb22df4a89cdf3a4506804b8b3ac5928db5c75.tar.bz2 historical-c1fb22df4a89cdf3a4506804b8b3ac5928db5c75.zip |
Patch applied to use keybindings in root menu. See ChangeLog for more details.
-rw-r--r-- | x11-wm/fluxbox/ChangeLog | 15 | ||||
-rw-r--r-- | x11-wm/fluxbox/files/digest-fluxbox-0.1.13-r1 | 1 | ||||
-rw-r--r-- | x11-wm/fluxbox/files/fluxbox-0.1.13-menukey.patch | 222 | ||||
-rw-r--r-- | x11-wm/fluxbox/fluxbox-0.1.13-r1.ebuild | 50 |
4 files changed, 288 insertions, 0 deletions
diff --git a/x11-wm/fluxbox/ChangeLog b/x11-wm/fluxbox/ChangeLog index 5c97d0a6d23d..21e5178f51fe 100644 --- a/x11-wm/fluxbox/ChangeLog +++ b/x11-wm/fluxbox/ChangeLog @@ -2,6 +2,21 @@ # Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL # $Header +*fluxbox-0.1.13-r1 (21 Nov 2002) + + 21 Nov 2002; Matt Keadle <mkeadle@gentoo.org> fluxbox-0.1.13-r1.ebuild + files/digest-fluxbox-0.1.13-r1 files/fluxbox-0.1.13-menukey.patch + + Patch applied to allow manipulation of the root applications menu with + standard keybindings. In your ~/.fluxbox/keys files you can now make + use of: WindowMenu, NextMenuItem, PrevMenuItem, SelectMenuItem, + OpenSubmenu, and CloseMenu. For instance: + + Control Right :OpenSubmenu + + No found issues with any flags or build types associated with fluxbox + + *fluxbox-0.1.13 (19 Nov 2002) 19 Nov 2002; Matt Keadle <mkeadle@gentoo.org> fluxbox-0.1.13.ebuild diff --git a/x11-wm/fluxbox/files/digest-fluxbox-0.1.13-r1 b/x11-wm/fluxbox/files/digest-fluxbox-0.1.13-r1 new file mode 100644 index 000000000000..b74d9982fc39 --- /dev/null +++ b/x11-wm/fluxbox/files/digest-fluxbox-0.1.13-r1 @@ -0,0 +1 @@ +MD5 24844a5961b56406e2d6d52f199e54bb fluxbox-0.1.13.tar.bz2 350608 diff --git a/x11-wm/fluxbox/files/fluxbox-0.1.13-menukey.patch b/x11-wm/fluxbox/files/fluxbox-0.1.13-menukey.patch new file mode 100644 index 000000000000..4917879ee144 --- /dev/null +++ b/x11-wm/fluxbox/files/fluxbox-0.1.13-menukey.patch @@ -0,0 +1,222 @@ +diff -uNr fluxbox-0.1.13-orig/src/Basemenu.cc fluxbox-0.1.13/src/Basemenu.cc +--- fluxbox-0.1.13-orig/src/Basemenu.cc 2002-11-15 23:24:59.000000000 +0900 ++++ fluxbox-0.1.13/src/Basemenu.cc 2002-11-20 14:11:11.000000000 +0900 +@@ -136,6 +136,8 @@ + m_screen->getDepth(), InputOutput, + m_screen->getVisual(), attrib_mask, &attrib); + m_fluxbox->saveMenuSearch(menu.frame, this); ++ ++ menu.highlighted = -1; + + } + +@@ -428,6 +430,7 @@ + + torn = visible = false; + which_sub = which_press = which_sub = -1; ++ menu.highlighted = -1; + + XUnmapWindow(m_display, menu.window); + } +@@ -759,6 +762,11 @@ + break; + } + } ++ if (highlight) { ++ if (menu.highlighted != (int)index) ++ drawItem(menu.highlighted, False, True); ++ menu.highlighted = index; ++ } + } + + +@@ -1078,3 +1086,41 @@ + menu.bevel_w = m_screen->getBevelWidth(); + update(); + } ++ ++void Basemenu::highlightNextItem() { ++ if (menu.highlighted >= 0) ++ drawItem(menu.highlighted, False, True); ++ ++ menu.highlighted++; ++ if (menu.highlighted >= (int)menuitems.size()) ++ menu.highlighted = 0; ++ ++ drawItem(menu.highlighted, True); ++} ++ ++void Basemenu::highlightPrevItem() { ++ if (menu.highlighted >= 0) ++ drawItem(menu.highlighted, False, True); ++ ++ menu.highlighted--; ++ if (menu.highlighted < 0) ++ menu.highlighted = menuitems.size() - 1; ++ ++ drawItem(menu.highlighted, True); ++} ++ ++void Basemenu::selectMenuItem() { ++ if (menu.highlighted >= 0) ++ itemSelected(1, menu.highlighted); ++} ++ ++void Basemenu::openSubmenu() { ++ if (menu.highlighted >= 0) ++ if (hasSubmenu(menu.highlighted)) { ++ drawSubmenu(menu.highlighted); ++ } ++} ++ ++void Basemenu::closeMenu() { ++ internal_hide(); ++} +diff -uNr fluxbox-0.1.13-orig/src/Basemenu.hh fluxbox-0.1.13/src/Basemenu.hh +--- fluxbox-0.1.13-orig/src/Basemenu.hh 2002-11-04 03:45:30.000000000 +0900 ++++ fluxbox-0.1.13/src/Basemenu.hh 2002-11-20 14:11:11.000000000 +0900 +@@ -88,6 +88,11 @@ + virtual void drawSubmenu(unsigned int index); + virtual void show(); + virtual void hide(); ++ virtual void highlightNextItem(); ++ virtual void highlightPrevItem(); ++ virtual void selectMenuItem(); ++ virtual void openSubmenu(); ++ virtual void closeMenu(); + /*@}*/ + + /** +@@ -153,6 +158,7 @@ + grab_x, grab_y; + unsigned int width, height, title_h, frame_h, item_w, item_h, bevel_w, + bevel_h; ++ int highlighted; + } menu; + + }; +diff -uNr fluxbox-0.1.13-orig/src/Keys.cc fluxbox-0.1.13/src/Keys.cc +--- fluxbox-0.1.13-orig/src/Keys.cc 2002-11-13 23:34:24.000000000 +0900 ++++ fluxbox-0.1.13/src/Keys.cc 2002-11-20 14:11:11.000000000 +0900 +@@ -122,6 +122,12 @@ + {"ToggleDecor", TOGGLEDECOR}, + {"ToggleTab", TOGGLETAB}, + {"RootMenu", ROOTMENU}, ++ {"WindowMenu", WINDOWMENU}, ++ {"NextMenuItem", NEXTMENUITEM}, ++ {"PrevMenuItem", PREVMENUITEM}, ++ {"SelectMenuItem", SELECTMENUITEM}, ++ {"OpenSubmenu", OPENSUBMENU}, ++ {"CloseMenu", CLOSEMENU}, + {0, LASTKEYGRAB} + }; + +diff -uNr fluxbox-0.1.13-orig/src/Keys.hh fluxbox-0.1.13/src/Keys.hh +--- fluxbox-0.1.13-orig/src/Keys.hh 2002-11-13 23:35:01.000000000 +0900 ++++ fluxbox-0.1.13/src/Keys.hh 2002-11-20 14:11:11.000000000 +0900 +@@ -59,6 +59,10 @@ + TOGGLEDECOR,// toggle visibility of decor (title, frame, handles) + TOGGLETAB, // toggle visibilty of tab + ROOTMENU, // pop up rootmenu ++ WINDOWMENU, // pop up windowmenu ++ NEXTMENUITEM, PREVMENUITEM, // navigate to next/prev item ++ SELECTMENUITEM, // select current menu item ++ OPENSUBMENU, CLOSEMENU, // open/close (sub)menu + LASTKEYGRAB //mark end of keygrabbs + }; + /** +diff -uNr fluxbox-0.1.13-orig/src/fluxbox.cc fluxbox-0.1.13/src/fluxbox.cc +--- fluxbox-0.1.13-orig/src/fluxbox.cc 2002-11-15 21:19:17.000000000 +0900 ++++ fluxbox-0.1.13/src/fluxbox.cc 2002-11-20 14:11:48.000000000 +0900 +@@ -1391,6 +1391,25 @@ + } + } + break; ++ case Keys::NEXTMENUITEM: ++ case Keys::PREVMENUITEM: ++ case Keys::SELECTMENUITEM: ++ case Keys::OPENSUBMENU: ++ case Keys::CLOSEMENU: ++ { ++ Basemenu *target = 0; ++ std::map<Window, Basemenu *>::iterator it = menuSearch.begin(); ++ std::map<Window, Basemenu *>::iterator it_end = menuSearch.end(); ++ for (int i = 0; it != it_end; ++it, ++i) { ++ Basemenu *menu = it->second; ++ if (menu != target && menu->isVisible() && menu->currentSubmenu() < 0) { ++ target = menu; ++ } ++ } ++ if (target != 0) ++ doMenuAction(target, action); ++ } ++ break; + default: //try to see if its a window action + doWindowAction(action, key->getParam()); + } +@@ -1404,6 +1423,27 @@ + + + } ++void Fluxbox::doMenuAction(Basemenu *target, Keys::KeyAction action) { ++ switch (action) { ++ case Keys::NEXTMENUITEM: ++ target->highlightNextItem(); ++ break; ++ case Keys::PREVMENUITEM: ++ target->highlightPrevItem(); ++ break; ++ case Keys::SELECTMENUITEM: ++ target->selectMenuItem(); ++ break; ++ case Keys::OPENSUBMENU: ++ target->openSubmenu(); ++ break; ++ case Keys::CLOSEMENU: ++ target->closeMenu(); ++ break; ++ default: ++ break; ++ } ++} + void Fluxbox::doWindowAction(Keys::KeyAction action, const int param) { + if (!focused_window) + return; +@@ -1551,6 +1591,26 @@ + case Keys::TOGGLETAB: + focused_window->setTab(!focused_window->hasTab()); + break; ++ case Keys::WINDOWMENU: ++ { ++ Windowmenu *menu = 0; ++ ++ menu = focused_window->getWindowmenu(); ++ if (menu) { ++ int x, y; ++ x = focused_window->getXFrame(); ++ y = focused_window->getYFrame(); ++ focused_window->showMenu(x, y); ++// menu->move(x, y); ++// if (! menu->isVisible()) { ++// menu->show(); ++// XRaiseWindow(getXDisplay(), menu->windowID()); ++// XRaiseWindow(getXDisplay(), menu->getSendToMenu()->windowID()); ++// XRaiseWindow(getXDisplay(), menu->getSendGroupToMenu()->windowID()); ++// } ++ } ++ } ++ break; + default: //do nothing + break; + } +diff -uNr fluxbox-0.1.13-orig/src/fluxbox.hh fluxbox-0.1.13/src/fluxbox.hh +--- fluxbox-0.1.13-orig/src/fluxbox.hh 2002-10-24 06:47:59.000000000 +0900 ++++ fluxbox-0.1.13/src/fluxbox.hh 2002-11-20 14:11:11.000000000 +0900 +@@ -221,6 +221,7 @@ + void handleClientMessage(XClientMessageEvent &ce); + void handleKeyEvent(XKeyEvent &ke); + void doWindowAction(Keys::KeyAction action, const int param); ++ void doMenuAction(Basemenu *menu, Keys::KeyAction action); + + ResourceManager m_resourcemanager, m_screen_rm; + diff --git a/x11-wm/fluxbox/fluxbox-0.1.13-r1.ebuild b/x11-wm/fluxbox/fluxbox-0.1.13-r1.ebuild new file mode 100644 index 000000000000..dc194863c1c7 --- /dev/null +++ b/x11-wm/fluxbox/fluxbox-0.1.13-r1.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-wm/fluxbox/fluxbox-0.1.13-r1.ebuild,v 1.1 2002/11/22 01:27:36 mkeadle Exp $ + +IUSE="nls" + +inherit commonbox flag-o-matic + +S=${WORKDIR}/${P} +DESCRIPTION="Window manager based on Blackbox and pwm -- has tabs." +SRC_URI="http://download.sourceforge.net/${PN}/${P}.tar.bz2" +HOMEPAGE="http://fluxbox.sf.net" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="x86 ~ppc ~sparc ~sparc64" + +mydoc="ChangeLog COPYING NEWS" +myconf="--enable-xinerama" +filter-flags -fno-exceptions +export WANT_AUTOMAKE_1_6=1 +export WANT_AUTOCONF_2_5=1 + +src_unpack() { + + unpack ${P}.tar.bz2 + cd ${S} + patch -p1 < ${FILESDIR}/fluxbox-0.1.13-menukey.patch +} + +src_compile() { + + commonbox_src_compile + + cd data + make \ + pkgdatadir=/usr/share/commonbox init +} + + +src_install() { + + commonbox_src_install + cd data + insinto /usr/share/commonbox + doins init + insinto /usr/share/commonbox/fluxbox + doins keys + rm -f ${D}/usr/bin/fluxbox-generate_menu +} |