aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--src/IconButton.cc11
-rw-r--r--src/Screen.cc1
-rw-r--r--src/Screen.hh3
-rw-r--r--src/Toolbar.cc19
-rw-r--r--src/fluxbox.cc12
6 files changed, 39 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 23e8b3b..cca8d66 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,10 @@
1(Format: Year/Month/Day) 1(Format: Year/Month/Day)
2Changes for 0.9.16: 2Changes for 0.9.16:
3*06/04/16: 3*06/04/16:
4 * Add option to reverse desktop wheeling, patch #1034287
5 session.screen0.reversewheeling: true|false
6 (thanks Kalle - ice_jkpg at users.sourceforge.net)
7 Screen.hh/cc fluxbox.cc Toolbar.cc IconButton.cc
4 * Missing space in translation (thanks... anonymous, sf.net #1455024) 8 * Missing space in translation (thanks... anonymous, sf.net #1455024)
5 nls/C/Translation.m 9 nls/C/Translation.m
6 * Set (take|send)to(next|prev)workspace offset default value to 1 10 * Set (take|send)to(next|prev)workspace offset default value to 1
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
526void Toolbar::buttonReleaseEvent(XButtonEvent &re) { 526void 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
535void Toolbar::enterNotifyEvent(XCrossingEvent &not_used) { 544void Toolbar::enterNotifyEvent(XCrossingEvent &not_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;