leftWorkspace/rightWorkspace added
pekdon pekdon
4 files changed,
29 insertions(+),
9 deletions(-)
M
ChangeLog
→
ChangeLog
@@ -1,4 +1,9 @@
Changes for 0.1.7: +*02/02/02: + * Added leftWorkspace and rightWorkspace, now those keybindings + actually work. (Claes Nästén) + * Fixed small glitch in Tab.cc. (Claes Nästén) + *02/01/27: * Clean up in menu loading * Moved from old C style file reading to c++ istream
M
src/Screen.cc
→
src/Screen.cc
@@ -1643,3 +1643,19 @@ changeWorkspaceID(getCount()-1);
else changeWorkspaceID(getCurrentWorkspaceID()-1); } + +//-------------- rightWorkspace --------------- +// Goes to the workspace "right" of the current +//-------------------------------------------- +void BScreen::rightWorkspace(void) { + if (getCurrentWorkspaceID()+1 < getCount()) + changeWorkspaceID(getCurrentWorkspaceID()+1); +} + +//------------- leftWorkspace ---------------- +// Goes to the workspace "left" of the current +//-------------------------------------------- +void BScreen::leftWorkspace(void) { + if (getCurrentWorkspaceID() > 0) + changeWorkspaceID(getCurrentWorkspaceID()-1); +}
M
src/Screen.hh
→
src/Screen.hh
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.hh,v 1.13 2002/01/27 12:45:32 fluxgen Exp $ +// $Id: Screen.hh,v 1.14 2002/02/02 19:51:15 pekdon Exp $ #ifndef _SCREEN_HH_ #define _SCREEN_HH_@@ -205,6 +205,8 @@ int removeLastWorkspace(void);
//scroll workspaces void nextWorkspace(); void prevWorkspace(); + void rightWorkspace(); + void leftWorkspace(); void removeWorkspaceNames(void); void updateWorkspaceNamesAtom(void);
M
src/fluxbox.cc
→
src/fluxbox.cc
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: fluxbox.cc,v 1.24 2002/01/21 02:04:23 fluxgen Exp $ +// $Id: fluxbox.cc,v 1.25 2002/02/02 19:51:15 pekdon Exp $ //Use some GNU extensions #ifndef _GNU_SOURCE@@ -958,15 +958,12 @@ break;
case Keys::PREVWORKSPACE: screen->prevWorkspace(); break; - /*case Keys::grabUpWorkspace: + case Keys::LEFTWORKSPACE: + screen->leftWorkspace(); break; - case Keys::grabDownWorkspace: + case Keys::RIGHTWORKSPACE: + screen->rightWorkspace(); break; - case Keys::grabLeftWorkspace: - break; - case Keys::grabRightWorkspace: - break; - */ case Keys::KILLWINDOW: //kill the current window XKillClient(screen->getBaseDisplay()->getXDisplay(), focused_window->getClientWindow());