From b53183cfe3c2a300ccec08b6912e416ae0cbb97b Mon Sep 17 00:00:00 2001 From: fluxgen Date: Wed, 8 May 2002 10:14:51 +0000 Subject: added desktopwheeling option --- src/Screen.cc | 5 +++-- src/Screen.hh | 6 ++++-- src/fluxbox.cc | 6 +++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/Screen.cc b/src/Screen.cc index 6bbe39f..e27a9db 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -16,13 +16,13 @@ // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // 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.cc,v 1.48 2002/05/07 13:54:42 fluxgen Exp $ +// $Id: Screen.cc,v 1.49 2002/05/08 10:12:17 fluxgen Exp $ //use GNU extensions #ifndef _GNU_SOURCE @@ -202,6 +202,7 @@ max_over_slit(rm, true, scrname+".maxOverSlit",altscrname+".MaxOverSlit"), tab_rotate_vertical(rm, true, scrname+".tab.rotatevertical", altscrname+".Tab.RotateVertical"), sloppy_window_grouping(rm, true, scrname+".sloppywindowgrouping", altscrname+".SloppyWindowGrouping"), workspace_warping(rm, true, scrname+".workspacewarping", altscrname+".WorkspaceWarping"), +desktop_wheeling(rm, true, scrname+".desktopwheeling", altscrname+".DesktopWheeling"), focus_last(rm, true, scrname+".focusLastWindow", altscrname+".FocusLastWindow"), focus_new(rm, true, scrname+".focusNewWindows", altscrname+".FocusNewWindows"), rootcommand(rm, "", scrname+".rootCommand", altscrname+".RootCommand"), diff --git a/src/Screen.hh b/src/Screen.hh index 9492d50..12529e3 100644 --- a/src/Screen.hh +++ b/src/Screen.hh @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.hh,v 1.31 2002/04/19 09:34:10 fluxgen Exp $ +// $Id: Screen.hh,v 1.32 2002/05/08 10:10:19 fluxgen Exp $ #ifndef SCREEN_HH #define SCREEN_HH @@ -79,6 +79,7 @@ public: inline bool isTabRotateVertical(void) { return *resource.tab_rotate_vertical; } inline bool isSloppyWindowGrouping(void) { return *resource.sloppy_window_grouping; } inline bool isWorkspaceWarping(void) { return *resource.workspace_warping; } + inline bool isDesktopWheeling(void) { return *resource.desktop_wheeling; } inline bool doAutoRaise(void) { return resource.auto_raise; } inline bool doImageDither(void) { return *resource.image_dither; } inline bool doMaxOverSlit(void) { return *resource.max_over_slit; } @@ -175,6 +176,7 @@ public: inline void saveTabRotateVertical(bool r) { resource.tab_rotate_vertical = r; } inline void saveSloppyWindowGrouping(bool s) { resource.sloppy_window_grouping = s; } inline void saveWorkspaceWarping(bool s) { resource.workspace_warping = s; } + inline void saveDesktopWheeling(bool s) { resource.desktop_wheeling = s; } inline void iconUpdate(void) { iconmenu->update(); } inline Iconmenu *getIconmenu(void) { return iconmenu; } @@ -298,7 +300,7 @@ private: image_dither, opaque_move, full_max, max_over_slit, tab_rotate_vertical, sloppy_window_grouping, workspace_warping, - focus_last, focus_new; + desktop_wheeling, focus_last, focus_new; Resource rootcommand; bool auto_raise, sloppy_focus, semi_sloppy_focus, ordered_dither; diff --git a/src/fluxbox.cc b/src/fluxbox.cc index f61eca2..d4aefa2 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: fluxbox.cc,v 1.56 2002/05/08 09:33:11 fluxgen Exp $ +// $Id: fluxbox.cc,v 1.57 2002/05/08 10:14:51 fluxgen Exp $ //Use GNU extensions #ifndef _GNU_SOURCE @@ -973,9 +973,9 @@ void Fluxbox::handleButtonEvent(XButtonEvent &be) { checkMenu(); screen->getRootmenu()->show(); } - } else if (be.button == 4) { + } else if (screen->isDesktopWheeling() && be.button == 4) { screen->nextWorkspace(1); - } else if (be.button == 5) { + } else if (screen->isDesktopWheeling() && be.button == 5) { screen->prevWorkspace(1); } } -- cgit v0.11.2