all repos — fluxbox @ 21bc356be2200f07cf5235714493f6dc79583713

custom fork of the fluxbox windowmanager

fixed click raise option, patch from Dale P. Smith
fluxgen fluxgen
commit

21bc356be2200f07cf5235714493f6dc79583713

parent

80c38380d1ef1394ab3b19ca51680a28fd27fa3a

3 files changed, 26 insertions(+), 23 deletions(-)

jump to
M src/Screen.ccsrc/Screen.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.cc,v 1.123 2003/04/15 23:09:12 rathnor Exp $ +// $Id: Screen.cc,v 1.124 2003/04/16 00:37:19 fluxgen Exp $ #include "Screen.hh"

@@ -386,6 +386,7 @@ focus_last(rm, true, scrname+".focusLastWindow", altscrname+".FocusLastWindow"),

focus_new(rm, true, scrname+".focusNewWindows", altscrname+".FocusNewWindows"), antialias(rm, false, scrname+".antialias", altscrname+".Antialias"), auto_raise(rm, false, scrname+".autoRaise", altscrname+".AutoRaise"), + click_raises(rm, true, scrname+".clickRaises", altscrname+".ClickRaises"), rootcommand(rm, "", scrname+".rootCommand", altscrname+".RootCommand"), focus_model(rm, Fluxbox::CLICKTOFOCUS, scrname+".focusModel", altscrname+".FocusModel"), workspaces(rm, 1, scrname+".workspaces", altscrname+".Workspaces"),

@@ -1864,23 +1865,23 @@ // create focus menu

FbTk::Menu *focus_menu = createMenuFromScreen(*this); focus_menu->insert(new FocusModelMenuItem(i18n->getMessage( - ConfigmenuSet, - ConfigmenuClickToFocus, - "Click To Focus"), + ConfigmenuSet, + ConfigmenuClickToFocus, + "Click To Focus"), *this, Fluxbox::CLICKTOFOCUS, save_and_reconfigure)); focus_menu->insert(new FocusModelMenuItem(i18n->getMessage( - ConfigmenuSet, - ConfigmenuSloppyFocus, - "Sloppy Focus"), + ConfigmenuSet, + ConfigmenuSloppyFocus, + "Sloppy Focus"), *this, Fluxbox::SLOPPYFOCUS, save_and_reconfigure)); focus_menu->insert(new FocusModelMenuItem(i18n->getMessage( - ConfigmenuSet, - ConfigmenuSemiSloppyFocus, - "Semi Sloppy Focus"), + ConfigmenuSet, + ConfigmenuSemiSloppyFocus, + "Semi Sloppy Focus"), *this, Fluxbox::SEMISLOPPYFOCUS, save_and_reconfigure));

@@ -1894,6 +1895,7 @@

focus_menu->update(); rootmenuList.push_back(focus_menu); + menu.insert(i18n->getMessage( ConfigmenuSet, ConfigmenuFocusModel, "Focus Model"),

@@ -1903,8 +1905,8 @@ if (getSlit() != 0)

menu.insert("Slit", &getSlit()->menu()); #endif // SLIT menu.insert(i18n->getMessage( - ToolbarSet, ToolbarToolbarTitle, - "Toolbar"), &m_toolbarhandler->getToolbarMenu()); + ToolbarSet, ToolbarToolbarTitle, + "Toolbar"), &m_toolbarhandler->getToolbarMenu()); menu.insert(new BoolMenuItem(i18n->getMessage( ConfigmenuSet, ConfigmenuImageDithering,

@@ -1947,6 +1949,9 @@ ConfigmenuSet, ConfigmenuDesktopWheeling,

"Desktop MouseWheel Switching"), *resource.desktop_wheeling, save_and_reconfigure)); + menu.insert(new BoolMenuItem("Click Raises", + *resource.click_raises, + save_and_reconfigure)); // setup antialias cmd to reload style and save resource on toggle menu.insert(new BoolMenuItem("antialias", *resource.antialias, save_and_reconfigure));
M src/Screen.hhsrc/Screen.hh

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.hh,v 1.76 2003/04/15 12:14:13 fluxgen Exp $ +// $Id: Screen.hh,v 1.77 2003/04/16 00:36:09 fluxgen Exp $ #ifndef SCREEN_HH #define SCREEN_HH

@@ -89,6 +89,7 @@ inline bool isSloppyWindowGrouping() const { return *resource.sloppy_window_grouping; }

inline bool isWorkspaceWarping() const { return *resource.workspace_warping; } inline bool isDesktopWheeling() const { return *resource.desktop_wheeling; } inline bool doAutoRaise() const { return *resource.auto_raise; } + inline bool clickRaises() const { return *resource.click_raises; } inline bool doImageDither() const { return *resource.image_dither; } inline bool doMaxOverSlit() const { return *resource.max_over_slit; } inline bool doOpaqueMove() const { return *resource.opaque_move; }

@@ -397,7 +398,7 @@ max_over_slit,

sloppy_window_grouping, workspace_warping, desktop_wheeling, show_window_pos, focus_last, focus_new, - antialias, auto_raise; + antialias, auto_raise, click_raises; Resource<std::string> rootcommand; Resource<Fluxbox::FocusModel> focus_model; bool ordered_dither;
M src/Window.ccsrc/Window.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Window.cc,v 1.138 2003/04/15 23:09:13 rathnor Exp $ +// $Id: Window.cc,v 1.139 2003/04/16 00:38:06 fluxgen Exp $ #include "Window.hh"

@@ -320,13 +320,9 @@

m_frame.reconfigure(); // redirect events from frame to us -#ifdef DEBUG - cerr<<"Setting up catch for events in frame"<<endl; -#endif // DEBUG + m_frame.setEventHandler(*this); -#ifdef DEBUG - cerr<<"setup for catching events....done"<<endl; -#endif // DEBUG + lastFocusTime.tv_sec = lastFocusTime.tv_usec = 0; // display connection

@@ -2192,8 +2188,9 @@ if ((! focused) && (! screen.isSloppyFocus())) { //check focus

setInputFocus(); } - if (m_frame.clientArea() == be.window) { - raise(); + if (m_frame.clientArea() == be.window) { + if (getScreen().clickRaises()) + raise(); XAllowEvents(display, ReplayPointer, be.time); } else { button_grab_x = be.x_root - m_frame.x() - screen.getBorderWidth();