From 21bc356be2200f07cf5235714493f6dc79583713 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Wed, 16 Apr 2003 00:38:06 +0000 Subject: fixed click raise option, patch from Dale P. Smith --- src/Screen.cc | 29 +++++++++++++++++------------ src/Screen.hh | 5 +++-- src/Window.cc | 15 ++++++--------- 3 files changed, 26 insertions(+), 23 deletions(-) diff --git a/src/Screen.cc b/src/Screen.cc index bac97e9..7f3efd3 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -22,7 +22,7 @@ // 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 @@ BScreen::ScreenResource::ScreenResource(ResourceManager &rm, 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 @@ void BScreen::setupConfigmenu(FbTk::Menu &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 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) { focus_menu->update(); rootmenuList.push_back(focus_menu); + menu.insert(i18n->getMessage( ConfigmenuSet, ConfigmenuFocusModel, "Focus Model"), @@ -1903,8 +1905,8 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) { 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 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) { "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)); diff --git a/src/Screen.hh b/src/Screen.hh index 87a7e90..e0d2398 100644 --- a/src/Screen.hh +++ b/src/Screen.hh @@ -22,7 +22,7 @@ // 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 @@ public: 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 @@ private: sloppy_window_grouping, workspace_warping, desktop_wheeling, show_window_pos, focus_last, focus_new, - antialias, auto_raise; + antialias, auto_raise, click_raises; Resource rootcommand; Resource focus_model; bool ordered_dither; diff --git a/src/Window.cc b/src/Window.cc index 35f5be9..5839c52 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -22,7 +22,7 @@ // 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 @@ void FluxboxWindow::init() { m_frame.reconfigure(); // redirect events from frame to us -#ifdef DEBUG - cerr<<"Setting up catch for events in frame"<