Index: src/Screen.cc =================================================================== --- src/Screen.cc (revision 4543) +++ src/Screen.cc (working copy) @@ -287,6 +287,8 @@ altscrname+".overlay.CapStyle"), scroll_action(rm, "", scrname+".windowScrollAction", altscrname+".WindowScrollAction"), scroll_reverse(rm, false, scrname+".windowScrollReverse", altscrname+".WindowScrollReverse"), + double_click_action(rm, "", scrname+".windowDoubleClickAction", altscrname+".WindowDoubleClickAction"), + middle_click_action(rm, "", scrname+".windowMiddleClickAction", altscrname+".WindowMiddleClickAction"), max_over_tabs(rm, false, scrname+".tabs.maxOver", altscrname+".Tabs.MaxOver"), default_internal_tabs(rm, false /* TODO: autoconf option? */ , scrname+".tabs.intitlebar", altscrname+".Tabs.InTitlebar") { Index: src/Window.cc =================================================================== --- src/Window.cc (revision 4543) +++ src/Window.cc (working copy) @@ -39,6 +39,7 @@ #include "WindowCmd.hh" #include "Remember.hh" #include "MenuCreator.hh" +#include "CommandParser.hh" #include "StringUtil.hh" #include "FocusControl.hh" #include "Layer.hh" @@ -3989,6 +3990,10 @@ CommandRef raise_and_focus_cmd(new WindowCmd(*this, &FluxboxWindow::raiseAndFocus)); CommandRef stick_cmd(new WindowCmd(*this, &FluxboxWindow::stick)); CommandRef show_menu_cmd(new WindowCmd(*this, &FluxboxWindow::popupMenu)); + CommandRef double_click_cmd( + CommandParser::instance().parseLine(screen().getDoubleClickAction())); + CommandRef middle_click_cmd( + CommandParser::instance().parseLine(screen().getMiddleClickAction())); // clear old buttons from frame frame().removeAllButtons(); @@ -4135,9 +4140,9 @@ // setup titlebar frame().setOnClickTitlebar(raise_and_focus_cmd, 1, false, true); // on press with button 1 - frame().setOnClickTitlebar(shade_cmd, 1, true); // doubleclick with button 1 + frame().setOnClickTitlebar(double_click_cmd, 1, true); // doubleclick with button 1 frame().setOnClickTitlebar(show_menu_cmd, 3); // on release with button 3 - frame().setOnClickTitlebar(lower_cmd, 2); // on release with button 2 + frame().setOnClickTitlebar(middle_click_cmd, 2); // on release with button 2 int reverse = 0; if (screen().getScrollReverse()) Index: src/Screen.hh =================================================================== --- src/Screen.hh (revision 4543) +++ src/Screen.hh (working copy) @@ -139,6 +139,8 @@ inline const std::string &getScrollAction() const { return *resource.scroll_action; } inline const bool getScrollReverse() const { return *resource.scroll_reverse; } + inline const std::string &getDoubleClickAction() const { return *resource.double_click_action; } + inline const std::string &getMiddleClickAction() const { return *resource.middle_click_action; } inline const bool getDefaultInternalTabs() const { return *resource.default_internal_tabs; } inline const bool getMaxOverTabs() const { return *resource.max_over_tabs; } @@ -452,6 +454,8 @@ FbTk::Resource gc_join_style; FbTk::Resource gc_cap_style; FbTk::Resource scroll_action; + FbTk::Resource double_click_action; + FbTk::Resource middle_click_action; FbTk::Resource scroll_reverse; FbTk::Resource max_over_tabs; FbTk::Resource default_internal_tabs;