From b7cd0599ae1ae7881bcd9bd33ad0fce03851533a Mon Sep 17 00:00:00 2001 From: fluxgen Date: Fri, 16 Jan 2004 11:41:38 +0000 Subject: windowmenu command, patch fomr Junichiro Kita --- src/FbCommandFactory.cc | 5 ++++- src/Toolbar.cc | 3 ++- src/Window.cc | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/FbCommandFactory.cc b/src/FbCommandFactory.cc index d3ea8ce..c8d9f4b 100644 --- a/src/FbCommandFactory.cc +++ b/src/FbCommandFactory.cc @@ -20,7 +20,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbCommandFactory.cc,v 1.24 2003/12/20 17:42:04 fluxgen Exp $ +// $Id: FbCommandFactory.cc,v 1.25 2004/01/16 11:41:38 fluxgen Exp $ #include "FbCommandFactory.hh" @@ -119,6 +119,7 @@ FbCommandFactory::FbCommandFactory() { "stick", "stickwindow", "toggledecor", + "windowmenu", "workspace", "workspacemenu", "" @@ -246,6 +247,8 @@ FbTk::Command *FbCommandFactory::stringToCommand(const std::string &command, return new CurrentWindowCmd(&FluxboxWindow::moveClientRight); else if (command == "detachclient") return new CurrentWindowCmd(&FluxboxWindow::detachCurrentClient); + else if (command == "windowmenu") + return new CurrentWindowCmd(&FluxboxWindow::popupMenu); // // Workspace commands // diff --git a/src/Toolbar.cc b/src/Toolbar.cc index b267b77..7cda0b0 100644 --- a/src/Toolbar.cc +++ b/src/Toolbar.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Toolbar.cc,v 1.136 2004/01/13 14:41:32 rathnor Exp $ +// $Id: Toolbar.cc,v 1.137 2004/01/16 11:41:38 fluxgen Exp $ #include "Toolbar.hh" @@ -493,6 +493,7 @@ void Toolbar::buttonPressEvent(XButtonEvent &be) { menu().move(x, y); menu().show(); + menu().grabInputFocus(); } else menu().hide(); diff --git a/src/Window.cc b/src/Window.cc index 9ba0f59..bb44b50 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Window.cc,v 1.259 2003/12/31 00:36:16 fluxgen Exp $ +// $Id: Window.cc,v 1.260 2004/01/16 11:41:38 fluxgen Exp $ #include "Window.hh" @@ -1925,6 +1925,7 @@ void FluxboxWindow::showMenu(int menu_x, int menu_y) { m_windowmenu.move(menu_x, menu_y); m_windowmenu.show(); m_windowmenu.raise(); + m_windowmenu.grabInputFocus(); } /** -- cgit v0.11.2