diff options
Diffstat (limited to 'src/Window.cc')
-rw-r--r-- | src/Window.cc | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/Window.cc b/src/Window.cc index 93fbea7..12f40fb 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -1788,6 +1788,19 @@ void FluxboxWindow::shade() { | |||
1788 | 1788 | ||
1789 | } | 1789 | } |
1790 | 1790 | ||
1791 | void FluxboxWindow::shadeOn() { | ||
1792 | |||
1793 | if (!shaded) | ||
1794 | shade(); | ||
1795 | |||
1796 | } | ||
1797 | |||
1798 | void FluxboxWindow::shadeOff() { | ||
1799 | |||
1800 | if (shaded) | ||
1801 | shade(); | ||
1802 | |||
1803 | } | ||
1791 | 1804 | ||
1792 | void FluxboxWindow::stick() { | 1805 | void FluxboxWindow::stick() { |
1793 | 1806 | ||
@@ -3752,6 +3765,10 @@ void FluxboxWindow::setupWindow() { | |||
3752 | CommandRef maximize_horiz_cmd(new WindowCmd(*this, &FluxboxWindow::maximizeHorizontal)); | 3765 | CommandRef maximize_horiz_cmd(new WindowCmd(*this, &FluxboxWindow::maximizeHorizontal)); |
3753 | CommandRef close_cmd(new WindowCmd(*this, &FluxboxWindow::close)); | 3766 | CommandRef close_cmd(new WindowCmd(*this, &FluxboxWindow::close)); |
3754 | CommandRef shade_cmd(new WindowCmd(*this, &FluxboxWindow::shade)); | 3767 | CommandRef shade_cmd(new WindowCmd(*this, &FluxboxWindow::shade)); |
3768 | CommandRef shade_on_cmd(new WindowCmd(*this, &FluxboxWindow::shadeOn)); | ||
3769 | CommandRef shade_off_cmd(new WindowCmd(*this, &FluxboxWindow::shadeOff)); | ||
3770 | CommandRef next_tab_cmd(new WindowCmd(*this, &FluxboxWindow::nextClient)); | ||
3771 | CommandRef prev_tab_cmd(new WindowCmd(*this, &FluxboxWindow::prevClient)); | ||
3755 | CommandRef raise_cmd(new WindowCmd(*this, &FluxboxWindow::raise)); | 3772 | CommandRef raise_cmd(new WindowCmd(*this, &FluxboxWindow::raise)); |
3756 | CommandRef lower_cmd(new WindowCmd(*this, &FluxboxWindow::lower)); | 3773 | CommandRef lower_cmd(new WindowCmd(*this, &FluxboxWindow::lower)); |
3757 | CommandRef raise_and_focus_cmd(new WindowCmd(*this, &FluxboxWindow::raiseAndFocus)); | 3774 | CommandRef raise_and_focus_cmd(new WindowCmd(*this, &FluxboxWindow::raiseAndFocus)); |
@@ -3837,6 +3854,19 @@ void FluxboxWindow::setupWindow() { | |||
3837 | frame().setOnClickTitlebar(shade_cmd, 1, true); // doubleclick with button 1 | 3854 | frame().setOnClickTitlebar(shade_cmd, 1, true); // doubleclick with button 1 |
3838 | frame().setOnClickTitlebar(show_menu_cmd, 3); // on release with button 3 | 3855 | frame().setOnClickTitlebar(show_menu_cmd, 3); // on release with button 3 |
3839 | frame().setOnClickTitlebar(lower_cmd, 2); // on release with button 2 | 3856 | frame().setOnClickTitlebar(lower_cmd, 2); // on release with button 2 |
3857 | |||
3858 | int reverse = 0; | ||
3859 | if (screen().getScrollReverse()) | ||
3860 | reverse = 1; | ||
3861 | |||
3862 | if (StringUtil::strcasestr(screen().getScrollAction(), std::string("shade")) == 0) { | ||
3863 | frame().setOnClickTitlebar(shade_on_cmd, 5 - reverse); // shade on mouse roll | ||
3864 | frame().setOnClickTitlebar(shade_off_cmd, 4 + reverse); // unshade if rolled oposite direction | ||
3865 | } else if (StringUtil::strcasestr(screen().getScrollAction(), std::string("nexttab")) == 0) { | ||
3866 | frame().setOnClickTitlebar(next_tab_cmd, 5 - reverse); // next tab | ||
3867 | frame().setOnClickTitlebar(prev_tab_cmd, 4 + reverse); // previous tab | ||
3868 | } | ||
3869 | |||
3840 | frame().setDoubleClickTime(Fluxbox::instance()->getDoubleClickInterval()); | 3870 | frame().setDoubleClickTime(Fluxbox::instance()->getDoubleClickInterval()); |
3841 | 3871 | ||
3842 | // end setup frame | 3872 | // end setup frame |