From 2b7aace6b304fc46ae4f948feb531ae60b39251e Mon Sep 17 00:00:00 2001 From: rathnor Date: Sat, 26 Jul 2003 13:44:00 +0000 Subject: fix a couple of keybindings --- ChangeLog | 4 ++++ src/CurrentWindowCmd.cc | 4 ++-- src/FbCommandFactory.cc | 13 +++++++++++-- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index f4d3d29..cbfa7cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ (Format: Year/Month/Day) Changes for 0.9.5: +*03/07/26: + * Fix some keybinding issues with ShadeWindow, StickWindow, + SendToWorkspace, NextGroup, PrevGroup (Simon) + CurrentWindowCmd.cc FbCommandFactory.cc *03/07/25: * Make fbrun work properly on multiple screens (Simon) FbRun.hh/cc diff --git a/src/CurrentWindowCmd.cc b/src/CurrentWindowCmd.cc index 8e0a70c..f4d4af7 100644 --- a/src/CurrentWindowCmd.cc +++ b/src/CurrentWindowCmd.cc @@ -20,7 +20,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: CurrentWindowCmd.cc,v 1.1 2003/06/30 14:35:11 fluxgen Exp $ +// $Id: CurrentWindowCmd.cc,v 1.2 2003/07/26 13:44:00 rathnor Exp $ #include "CurrentWindowCmd.hh" @@ -42,7 +42,7 @@ void KillWindowCmd::real_execute() { } void SendToWorkspaceCmd::real_execute() { - if (m_workspace_num > 0 && m_workspace_num < window().screen().getNumberOfWorkspaces()) + if (m_workspace_num >= 0 && m_workspace_num < window().screen().getNumberOfWorkspaces()) window().screen().sendToWorkspace(m_workspace_num, &window()); } diff --git a/src/FbCommandFactory.cc b/src/FbCommandFactory.cc index 59a01bd..2194bd6 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.9 2003/07/24 03:19:02 rathnor Exp $ +// $Id: FbCommandFactory.cc,v 1.10 2003/07/26 13:44:00 rathnor Exp $ #include "FbCommandFactory.hh" @@ -30,6 +30,7 @@ #include "WorkspaceCmd.hh" #include "fluxbox.hh" #include "SimpleCommand.hh" +#include "Screen.hh" // autoregister this module to command parser FbCommandFactory FbCommandFactory::s_autoreg; @@ -61,7 +62,9 @@ FbCommandFactory::FbCommandFactory() { "lower", "close", "shade", + "shadewindow", "stick", + "stickwindow", "toggledecor", "sendtoworkspace", "killwindow", @@ -75,6 +78,8 @@ FbCommandFactory::FbCommandFactory() { "workspace", "nextwindow", "prevwindow", + "nextgroup", + "prevgroup", "showdesktop", "arrangewindows", "rootmenu", @@ -139,7 +144,7 @@ FbTk::Command *FbCommandFactory::stringToCommand(const std::string &command, else if (command == "toggledecor") return new CurrentWindowCmd(&FluxboxWindow::toggleDecoration); else if (command == "sendtoworkspace") - return new SendToWorkspaceCmd(atoi(arguments.c_str())); + return new SendToWorkspaceCmd(atoi(arguments.c_str()) - 1); // make 1-indexed to user else if (command == "killwindow") return new KillWindowCmd(); else if (command == "nexttab") @@ -168,6 +173,10 @@ FbTk::Command *FbCommandFactory::stringToCommand(const std::string &command, return new NextWindowCmd(atoi(arguments.c_str())); else if (command == "prevwindow") return new PrevWindowCmd(atoi(arguments.c_str())); + else if (command == "nextgroup") + return new NextWindowCmd(atoi(arguments.c_str()) ^ BScreen::CYCLEGROUPS); + else if (command == "prevgroup") + return new PrevWindowCmd(atoi(arguments.c_str()) ^ BScreen::CYCLEGROUPS); else if (command == "arrangewindows") return new ArrangeWindowsCmd(); else if (command == "showdesktop") -- cgit v0.11.2