From 86a072e7fdbaa92744eb78ecc2e39e462477fd2e Mon Sep 17 00:00:00 2001 From: Mark Tiefenbruck Date: Sat, 4 Oct 2008 19:30:19 -0700 Subject: remove follow models --- ChangeLog | 2 + doc/asciidoc/fluxbox.1 | 12 ----- doc/asciidoc/fluxbox.txt | 12 ----- doc/fluxbox.1.in | 12 ----- src/Screen.cc | 2 - src/Screen.hh | 12 ----- src/ScreenResources.cc | 132 ----------------------------------------------- src/Window.cc | 15 ++---- 8 files changed, 5 insertions(+), 194 deletions(-) diff --git a/ChangeLog b/ChangeLog index ab1d29e..feb89ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ (Format: Year/Month/Day) Changes for 1.1.2 *08/10/05: + * Remove follow models (Mark) + Screen.cc/hh ScreenResources.cc Window.cc * Remove line style resources from init file (Mark) Screen.cc/hh * Remove rootcommand from init, as fbsetbg is run automatically nowadays. diff --git a/doc/asciidoc/fluxbox.1 b/doc/asciidoc/fluxbox.1 index 424e614..372883b 100644 --- a/doc/asciidoc/fluxbox.1 +++ b/doc/asciidoc/fluxbox.1 @@ -1755,18 +1755,6 @@ session\&.screen0\&.tab\&.placement: session\&.screen0\&.tab\&.width: This specifies the width of external tabs in pixels\&. Default: 64 -session\&.screen0\&.userFollowModel: - This specifies the behavior when a window on another workspace becomes the - active window\&. `Ignore\' does nothing\&. `Follow\' moves to the window\'s - workspace\&. `Current\' moves the window to the current workspace\&. - `SemiFollow\' acts like `Current\' for minimized windows and like `Follow\' - otherwise\&. Default: Follow - -session\&.screen0\&.followModel: - This specifies the behavior when a window on another workspace requests to - be focused\&. `Ignore\' does nothing, and `Follow\' uses the setting in - session\&.screen0\&.userFollowModel\&. Default: Ignore - session\&.screen0\&.focusModel: ClickToFocus|MouseFocus This controls how windows gain focus via the mouse\&. With `ClickToFocus\', the user must click on the window\&. With `MouseFocus\', windows gain focus diff --git a/doc/asciidoc/fluxbox.txt b/doc/asciidoc/fluxbox.txt index 18f99c6..9d03823 100644 --- a/doc/asciidoc/fluxbox.txt +++ b/doc/asciidoc/fluxbox.txt @@ -803,18 +803,6 @@ session.screen0.tab.placement: session.screen0.tab.width: This specifies the width of external tabs in pixels. Default: 64 -session.screen0.userFollowModel: - This specifies the behavior when a window on another workspace becomes the - active window. `Ignore' does nothing. `Follow' moves to the window's - workspace. `Current' moves the window to the current workspace. - `SemiFollow' acts like `Current' for minimized windows and like `Follow' - otherwise. Default: Follow - -session.screen0.followModel: - This specifies the behavior when a window on another workspace requests to - be focused. `Ignore' does nothing, and `Follow' uses the setting in - session.screen0.userFollowModel. Default: Ignore - session.screen0.focusModel: ClickToFocus|MouseFocus This controls how windows gain focus via the mouse. With `ClickToFocus', the user must click on the window. With `MouseFocus', windows gain focus diff --git a/doc/fluxbox.1.in b/doc/fluxbox.1.in index 424e614..372883b 100644 --- a/doc/fluxbox.1.in +++ b/doc/fluxbox.1.in @@ -1755,18 +1755,6 @@ session\&.screen0\&.tab\&.placement: session\&.screen0\&.tab\&.width: This specifies the width of external tabs in pixels\&. Default: 64 -session\&.screen0\&.userFollowModel: - This specifies the behavior when a window on another workspace becomes the - active window\&. `Ignore\' does nothing\&. `Follow\' moves to the window\'s - workspace\&. `Current\' moves the window to the current workspace\&. - `SemiFollow\' acts like `Current\' for minimized windows and like `Follow\' - otherwise\&. Default: Follow - -session\&.screen0\&.followModel: - This specifies the behavior when a window on another workspace requests to - be focused\&. `Ignore\' does nothing, and `Follow\' uses the setting in - session\&.screen0\&.userFollowModel\&. Default: Ignore - session\&.screen0\&.focusModel: ClickToFocus|MouseFocus This controls how windows gain focus via the mouse\&. With `ClickToFocus\', the user must click on the window\&. With `MouseFocus\', windows gain focus diff --git a/src/Screen.cc b/src/Screen.cc index 2c54d5d..18138c9 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -299,8 +299,6 @@ BScreen::ScreenResource::ScreenResource(FbTk::ResourceManager &rm, tab_placement(rm, FbWinFrame::TOPLEFT, scrname+".tab.placement", altscrname+".Tab.Placement"), windowmenufile(rm, Fluxbox::instance()->getDefaultDataFilename("windowmenu"), scrname+".windowMenu", altscrname+".WindowMenu"), typing_delay(rm, 0, scrname+".noFocusWhileTypingDelay", altscrname+".NoFocusWhileTypingDelay"), - follow_model(rm, SEMIFOLLOW_ACTIVE_WINDOW, scrname+".followModel", altscrname+".followModel"), - user_follow_model(rm, SEMIFOLLOW_ACTIVE_WINDOW, scrname+".userFollowModel", altscrname+".UserFollowModel"), workspaces(rm, 4, scrname+".workspaces", altscrname+".Workspaces"), edge_snap_threshold(rm, 10, scrname+".edgeSnapThreshold", altscrname+".EdgeSnapThreshold"), focused_alpha(rm, 255, scrname+".window.focus.alpha", altscrname+".Window.Focus.Alpha"), diff --git a/src/Screen.hh b/src/Screen.hh index c81098b..9511e3f 100644 --- a/src/Screen.hh +++ b/src/Screen.hh @@ -85,15 +85,6 @@ class Subject; class BScreen: public FbTk::EventHandler, public FbTk::Observer, private FbTk::NotCopyable { public: - /// a window becomes active / focussed on a different workspace - enum FollowModel { - IGNORE_OTHER_WORKSPACES = 0, ///< who cares? - FOLLOW_ACTIVE_WINDOW, ///< go to that workspace - SEMIFOLLOW_ACTIVE_WINDOW, ///< fetch iconified windows, else follow - FETCH_ACTIVE_WINDOW ///< put that window to the current workspace - }; - - typedef std::list Icons; typedef std::vector Workspaces; @@ -135,8 +126,6 @@ public: FbWinFrame::TabPlacement getTabPlacement() const { return *resource.tab_placement; } unsigned int noFocusWhileTypingDelay() const { return *resource.typing_delay; } - FollowModel getFollowModel() const { return *resource.follow_model; } - FollowModel getUserFollowModel() const { return *resource.user_follow_model; } const bool allowRemoteActions() const { return *resource.allow_remote_actions; } const bool clientMenuUsePixmap() const { return *resource.clientmenu_use_pixmap; } const bool getDefaultInternalTabs() const { return *resource.default_internal_tabs; } @@ -555,7 +544,6 @@ private: FbTk::Resource tab_placement; FbTk::Resource windowmenufile; FbTk::Resource typing_delay; - FbTk::Resource follow_model, user_follow_model; FbTk::Resource workspaces, edge_snap_threshold, focused_alpha, unfocused_alpha, menu_alpha, menu_delay, menu_delay_close, tab_width, tooltip_delay; diff --git a/src/ScreenResources.cc b/src/ScreenResources.cc index 2d2ddb6..159ecaa 100644 --- a/src/ScreenResources.cc +++ b/src/ScreenResources.cc @@ -52,136 +52,4 @@ void FbTk::Resource::setFromString(const char *str) { else setDefaultValue(); } - -template<> -string FbTk::Resource::getString() const { - switch (m_value) { - case BScreen::FOLLOW_ACTIVE_WINDOW: - default: - return string("Follow"); - break; - case BScreen::FETCH_ACTIVE_WINDOW: - return string("Current"); - break; - case BScreen::SEMIFOLLOW_ACTIVE_WINDOW: - return string("SemiFollow"); - break; - case BScreen::IGNORE_OTHER_WORKSPACES: - return string("Ignore"); - break; - } - -} - -template<> -void FbTk::Resource:: -setFromString(char const *strval) { - if (strcasecmp(strval, "Follow") == 0) - m_value = BScreen::FOLLOW_ACTIVE_WINDOW; - else if (strcasecmp(strval, "Current") == 0 || - strcasecmp(strval, "CurrentWorkspace") == 0 || - strcasecmp(strval, "Fetch") == 0) - m_value = BScreen::FETCH_ACTIVE_WINDOW; - else if (strcasecmp(strval, "SemiFollow") == 0) - m_value = BScreen::SEMIFOLLOW_ACTIVE_WINDOW; - else if (strcasecmp(strval, "Ignore") == 0) - m_value = BScreen::IGNORE_OTHER_WORKSPACES; - else - setDefaultValue(); -} - -template<> -string FbTk::Resource::getString() const { - switch(m_value) { - case FbTk::GContext::LINESOLID: - return "LineSolid"; - break; - case FbTk::GContext::LINEONOFFDASH: - return "LineOnOffDash"; - break; - case FbTk::GContext::LINEDOUBLEDASH: - return "LineDoubleDash"; - break; - }; - return "LineSolid"; -} - -template<> -void FbTk::Resource -::setFromString(char const *strval) { - - if (strcasecmp(strval, "LineSolid") == 0 ) - m_value = FbTk::GContext::LINESOLID; - else if (strcasecmp(strval, "LineOnOffDash") == 0 ) - m_value = FbTk::GContext::LINEONOFFDASH; - else if (strcasecmp(strval, "LineDoubleDash") == 0) - m_value = FbTk::GContext::LINEDOUBLEDASH; - else - setDefaultValue(); -} - -template<> -string FbTk::Resource::getString() const { - switch(m_value) { - case FbTk::GContext::JOINMITER: - return "JoinMiter"; - break; - case FbTk::GContext::JOINBEVEL: - return "JoinBevel"; - break; - case FbTk::GContext::JOINROUND: - return "JoinRound"; - break; - }; - return "JoinMiter"; -} - -template<> -void FbTk::Resource -::setFromString(char const *strval) { - - if (strcasecmp(strval, "JoinRound") == 0 ) - m_value = FbTk::GContext::JOINROUND; - else if (strcasecmp(strval, "JoinMiter") == 0 ) - m_value = FbTk::GContext::JOINMITER; - else if (strcasecmp(strval, "JoinBevel") == 0) - m_value = FbTk::GContext::JOINBEVEL; - else - setDefaultValue(); -} - -template<> -string FbTk::Resource::getString() const { - switch(m_value) { - case FbTk::GContext::CAPNOTLAST: - return "CapNotLast"; - break; - case FbTk::GContext::CAPBUTT: - return "CapButt"; - break; - case FbTk::GContext::CAPROUND: - return "CapRound"; - break; - case FbTk::GContext::CAPPROJECTING: - return "CapProjecting"; - break; - }; - return "CapNotLast"; -} - -template<> -void FbTk::Resource -::setFromString(char const *strval) { - - if (strcasecmp(strval, "CapNotLast") == 0 ) - m_value = FbTk::GContext::CAPNOTLAST; - else if (strcasecmp(strval, "CapProjecting") == 0 ) - m_value = FbTk::GContext::CAPPROJECTING; - else if (strcasecmp(strval, "CapRound") == 0) - m_value = FbTk::GContext::CAPROUND; - else if (strcasecmp(strval, "CapButt" ) == 0) - m_value = FbTk::GContext::CAPBUTT; - else - setDefaultValue(); -} } // end namespace FbTk diff --git a/src/Window.cc b/src/Window.cc index 305f7f3..da1809d 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -1273,13 +1273,8 @@ bool FluxboxWindow::focus() { if (screen().currentWorkspaceID() != workspaceNumber() && !isStuck()) { - BScreen::FollowModel model = screen().getUserFollowModel(); - if (model == BScreen::IGNORE_OTHER_WORKSPACES) - return false; - - // fetch the window to the current workspace - if (model == BScreen::FETCH_ACTIVE_WINDOW || - (isIconic() && model == BScreen::SEMIFOLLOW_ACTIVE_WINDOW)) + // fetch the window to the current workspace if minimized + if (isIconic()) screen().sendToWorkspace(screen().currentWorkspaceID(), this, false); // warp to the workspace of the window else @@ -2041,14 +2036,10 @@ bool FluxboxWindow::focusRequestFromClient(WinClient &from) { return false; bool ret = true; - // check what to do if window is on another workspace - if (screen().currentWorkspaceID() != workspaceNumber() && !isStuck() && - screen().getFollowModel() == BScreen::IGNORE_OTHER_WORKSPACES) - ret = false; FluxboxWindow *cur = FocusControl::focusedFbWindow(); WinClient *client = FocusControl::focusedWindow(); - if (ret && cur && getRootTransientFor(&from) != getRootTransientFor(client)) + if (cur && getRootTransientFor(&from) != getRootTransientFor(client)) ret = !(cur->isFullscreen() && getOnHead() == cur->getOnHead()) && !cur->isTyping(); -- cgit v0.11.2