diff options
author | simonb <simonb> | 2006-04-16 12:03:31 (GMT) |
---|---|---|
committer | simonb <simonb> | 2006-04-16 12:03:31 (GMT) |
commit | 29f975b302c1cc4ab758871811894dfe572a4f24 (patch) | |
tree | 3d8b4cfb07813b6846b0269f47b4d2e9d5727e16 /src | |
parent | 67b8277af0856320a8fc0be1515f01ba40456e45 (diff) | |
download | fluxbox_pavel-29f975b302c1cc4ab758871811894dfe572a4f24.zip fluxbox_pavel-29f975b302c1cc4ab758871811894dfe572a4f24.tar.bz2 |
add reversewheeling option
thanks Kalle - ice_jkpg at users.sourceforge.net
Diffstat (limited to 'src')
-rw-r--r-- | src/IconButton.cc | 11 | ||||
-rw-r--r-- | src/Screen.cc | 1 | ||||
-rw-r--r-- | src/Screen.hh | 3 | ||||
-rw-r--r-- | src/Toolbar.cc | 19 | ||||
-rw-r--r-- | src/fluxbox.cc | 12 |
5 files changed, 35 insertions, 11 deletions
diff --git a/src/IconButton.cc b/src/IconButton.cc index d36987f..015065c 100644 --- a/src/IconButton.cc +++ b/src/IconButton.cc | |||
@@ -161,9 +161,14 @@ IconButton::IconButton(const IconbarTool& tool, const FbTk::FbWindow &parent, | |||
161 | RefCmd menu_cmd(new ::ShowMenu(m_win)); | 161 | RefCmd menu_cmd(new ::ShowMenu(m_win)); |
162 | setOnClick(focus_cmd, 1); | 162 | setOnClick(focus_cmd, 1); |
163 | setOnClick(menu_cmd, 3); | 163 | setOnClick(menu_cmd, 3); |
164 | setOnClick(next_workspace, 4); | 164 | if(win.screen().isReverseWheeling()) { |
165 | setOnClick(prev_workspace, 5); | 165 | setOnClick(next_workspace, 5); |
166 | 166 | setOnClick(prev_workspace, 4); | |
167 | } else { | ||
168 | setOnClick(next_workspace, 4); | ||
169 | setOnClick(prev_workspace, 5); | ||
170 | } | ||
171 | |||
167 | m_win.hintSig().attach(this); | 172 | m_win.hintSig().attach(this); |
168 | 173 | ||
169 | FbTk::EventManager::instance()->add(*this, m_icon_window); | 174 | FbTk::EventManager::instance()->add(*this, m_icon_window); |
diff --git a/src/Screen.cc b/src/Screen.cc index 5dd5f9a..62abf95 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -251,6 +251,7 @@ BScreen::ScreenResource::ScreenResource(FbTk::ResourceManager &rm, | |||
251 | scrname+".sloppywindowgrouping", altscrname+".SloppyWindowGrouping"), | 251 | scrname+".sloppywindowgrouping", altscrname+".SloppyWindowGrouping"), |
252 | workspace_warping(rm, true, scrname+".workspacewarping", altscrname+".WorkspaceWarping"), | 252 | workspace_warping(rm, true, scrname+".workspacewarping", altscrname+".WorkspaceWarping"), |
253 | desktop_wheeling(rm, true, scrname+".desktopwheeling", altscrname+".DesktopWheeling"), | 253 | desktop_wheeling(rm, true, scrname+".desktopwheeling", altscrname+".DesktopWheeling"), |
254 | reverse_wheeling(rm, false, scrname+".reversewheeling", altscrname+".ReverseWheeling"), | ||
254 | show_window_pos(rm, true, scrname+".showwindowposition", altscrname+".ShowWindowPosition"), | 255 | show_window_pos(rm, true, scrname+".showwindowposition", altscrname+".ShowWindowPosition"), |
255 | antialias(rm, false, scrname+".antialias", altscrname+".Antialias"), | 256 | antialias(rm, false, scrname+".antialias", altscrname+".Antialias"), |
256 | auto_raise(rm, false, scrname+".autoRaise", altscrname+".AutoRaise"), | 257 | auto_raise(rm, false, scrname+".autoRaise", altscrname+".AutoRaise"), |
diff --git a/src/Screen.hh b/src/Screen.hh index ffac442..74a5ff9 100644 --- a/src/Screen.hh +++ b/src/Screen.hh | |||
@@ -113,6 +113,7 @@ public: | |||
113 | bool isSloppyWindowGrouping() const { return *resource.sloppy_window_grouping; } | 113 | bool isSloppyWindowGrouping() const { return *resource.sloppy_window_grouping; } |
114 | bool isWorkspaceWarping() const { return *resource.workspace_warping; } | 114 | bool isWorkspaceWarping() const { return *resource.workspace_warping; } |
115 | bool isDesktopWheeling() const { return *resource.desktop_wheeling; } | 115 | bool isDesktopWheeling() const { return *resource.desktop_wheeling; } |
116 | bool isReverseWheeling() const { return *resource.reverse_wheeling; } | ||
116 | bool doAutoRaise() const { return *resource.auto_raise; } | 117 | bool doAutoRaise() const { return *resource.auto_raise; } |
117 | bool clickRaises() const { return *resource.click_raises; } | 118 | bool clickRaises() const { return *resource.click_raises; } |
118 | bool doOpaqueMove() const { return *resource.opaque_move; } | 119 | bool doOpaqueMove() const { return *resource.opaque_move; } |
@@ -438,7 +439,7 @@ private: | |||
438 | 439 | ||
439 | FbTk::Resource<bool> image_dither, opaque_move, full_max, | 440 | FbTk::Resource<bool> image_dither, opaque_move, full_max, |
440 | sloppy_window_grouping, workspace_warping, | 441 | sloppy_window_grouping, workspace_warping, |
441 | desktop_wheeling, show_window_pos, | 442 | desktop_wheeling, reverse_wheeling, show_window_pos, |
442 | antialias, auto_raise, click_raises, decorate_transient; | 443 | antialias, auto_raise, click_raises, decorate_transient; |
443 | FbTk::Resource<std::string> rootcommand; | 444 | FbTk::Resource<std::string> rootcommand; |
444 | FbTk::Resource<ResizeModel> resize_model; | 445 | FbTk::Resource<ResizeModel> resize_model; |
diff --git a/src/Toolbar.cc b/src/Toolbar.cc index 319f56a..84a6afb 100644 --- a/src/Toolbar.cc +++ b/src/Toolbar.cc | |||
@@ -524,12 +524,21 @@ void Toolbar::buttonPressEvent(XButtonEvent &be) { | |||
524 | 524 | ||
525 | 525 | ||
526 | void Toolbar::buttonReleaseEvent(XButtonEvent &re) { | 526 | void Toolbar::buttonReleaseEvent(XButtonEvent &re) { |
527 | if (re.button == 1) | 527 | if (re.button == 1) { |
528 | raise(); | 528 | raise(); |
529 | else if (re.button == 4) //mousewheel scroll up | 529 | } else if (re.button == 4) { //mousewheel scroll up |
530 | screen().nextWorkspace(1); | 530 | if(screen().isReverseWheeling()) { |
531 | else if (re.button == 5) //mousewheel scroll down | 531 | screen().prevWorkspace(1); |
532 | screen().prevWorkspace(1); | 532 | } else { |
533 | screen().nextWorkspace(1); | ||
534 | } | ||
535 | } else if (re.button == 5) { //mousewheel scroll down | ||
536 | if(screen().isReverseWheeling()) { | ||
537 | screen().nextWorkspace(1); | ||
538 | } else { | ||
539 | screen().prevWorkspace(1); | ||
540 | } | ||
541 | } | ||
533 | } | 542 | } |
534 | 543 | ||
535 | void Toolbar::enterNotifyEvent(XCrossingEvent ¬_used) { | 544 | void Toolbar::enterNotifyEvent(XCrossingEvent ¬_used) { |
diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 5fcd4fe..62eef50 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc | |||
@@ -940,9 +940,17 @@ void Fluxbox::handleButtonEvent(XButtonEvent &be) { | |||
940 | FbCommands::ShowRootMenuCmd cmd; | 940 | FbCommands::ShowRootMenuCmd cmd; |
941 | cmd.execute(); | 941 | cmd.execute(); |
942 | } else if (screen->isDesktopWheeling() && be.button == 4) { | 942 | } else if (screen->isDesktopWheeling() && be.button == 4) { |
943 | screen->nextWorkspace(1); | 943 | if(screen->isReverseWheeling()) { |
944 | screen->prevWorkspace(1); | ||
945 | } else { | ||
946 | screen->nextWorkspace(1); | ||
947 | } | ||
944 | } else if (screen->isDesktopWheeling() && be.button == 5) { | 948 | } else if (screen->isDesktopWheeling() && be.button == 5) { |
945 | screen->prevWorkspace(1); | 949 | if(screen->isReverseWheeling()) { |
950 | screen->nextWorkspace(1); | ||
951 | } else { | ||
952 | screen->prevWorkspace(1); | ||
953 | } | ||
946 | } | 954 | } |
947 | 955 | ||
948 | } break; | 956 | } break; |