add reversewheeling option thanks Kalle - ice_jkpg at users.sourceforge.net
simonb simonb
6 files changed,
39 insertions(+),
11 deletions(-)
M
ChangeLog
→
ChangeLog
@@ -1,6 +1,10 @@
(Format: Year/Month/Day) Changes for 0.9.16: *06/04/16: + * Add option to reverse desktop wheeling, patch #1034287 + session.screen0.reversewheeling: true|false + (thanks Kalle - ice_jkpg at users.sourceforge.net) + Screen.hh/cc fluxbox.cc Toolbar.cc IconButton.cc * Missing space in translation (thanks... anonymous, sf.net #1455024) nls/C/Translation.m * Set (take|send)to(next|prev)workspace offset default value to 1
M
src/IconButton.cc
→
src/IconButton.cc
@@ -161,9 +161,14 @@ RefCmd focus_cmd(new ::FocusCommand(tool, m_win));
RefCmd menu_cmd(new ::ShowMenu(m_win)); setOnClick(focus_cmd, 1); setOnClick(menu_cmd, 3); - setOnClick(next_workspace, 4); - setOnClick(prev_workspace, 5); - + if(win.screen().isReverseWheeling()) { + setOnClick(next_workspace, 5); + setOnClick(prev_workspace, 4); + } else { + setOnClick(next_workspace, 4); + setOnClick(prev_workspace, 5); + } + m_win.hintSig().attach(this); FbTk::EventManager::instance()->add(*this, m_icon_window);
M
src/Screen.cc
→
src/Screen.cc
@@ -251,6 +251,7 @@ 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"), + reverse_wheeling(rm, false, scrname+".reversewheeling", altscrname+".ReverseWheeling"), show_window_pos(rm, true, scrname+".showwindowposition", altscrname+".ShowWindowPosition"), antialias(rm, false, scrname+".antialias", altscrname+".Antialias"), auto_raise(rm, false, scrname+".autoRaise", altscrname+".AutoRaise"),
M
src/Screen.hh
→
src/Screen.hh
@@ -113,6 +113,7 @@ bool isScreenManaged() const { return managed; }
bool isSloppyWindowGrouping() const { return *resource.sloppy_window_grouping; } bool isWorkspaceWarping() const { return *resource.workspace_warping; } bool isDesktopWheeling() const { return *resource.desktop_wheeling; } + bool isReverseWheeling() const { return *resource.reverse_wheeling; } bool doAutoRaise() const { return *resource.auto_raise; } bool clickRaises() const { return *resource.click_raises; } bool doOpaqueMove() const { return *resource.opaque_move; }@@ -438,7 +439,7 @@ const std::string &altscrname);
FbTk::Resource<bool> image_dither, opaque_move, full_max, sloppy_window_grouping, workspace_warping, - desktop_wheeling, show_window_pos, + desktop_wheeling, reverse_wheeling, show_window_pos, antialias, auto_raise, click_raises, decorate_transient; FbTk::Resource<std::string> rootcommand; FbTk::Resource<ResizeModel> resize_model;
M
src/Toolbar.cc
→
src/Toolbar.cc
@@ -524,12 +524,21 @@ }
void Toolbar::buttonReleaseEvent(XButtonEvent &re) { - if (re.button == 1) + if (re.button == 1) { raise(); - else if (re.button == 4) //mousewheel scroll up - screen().nextWorkspace(1); - else if (re.button == 5) //mousewheel scroll down - screen().prevWorkspace(1); + } else if (re.button == 4) { //mousewheel scroll up + if(screen().isReverseWheeling()) { + screen().prevWorkspace(1); + } else { + screen().nextWorkspace(1); + } + } else if (re.button == 5) { //mousewheel scroll down + if(screen().isReverseWheeling()) { + screen().nextWorkspace(1); + } else { + screen().prevWorkspace(1); + } + } } void Toolbar::enterNotifyEvent(XCrossingEvent ¬_used) {
M
src/fluxbox.cc
→
src/fluxbox.cc
@@ -940,9 +940,17 @@ } else if (be.button == 3) {
FbCommands::ShowRootMenuCmd cmd; cmd.execute(); } else if (screen->isDesktopWheeling() && be.button == 4) { - screen->nextWorkspace(1); + if(screen->isReverseWheeling()) { + screen->prevWorkspace(1); + } else { + screen->nextWorkspace(1); + } } else if (screen->isDesktopWheeling() && be.button == 5) { - screen->prevWorkspace(1); + if(screen->isReverseWheeling()) { + screen->nextWorkspace(1); + } else { + screen->prevWorkspace(1); + } } } break;