all repos — fluxbox @ 86a072e7fdbaa92744eb78ecc2e39e462477fd2e

custom fork of the fluxbox windowmanager

remove follow models
Mark Tiefenbruck mark@fluxbox.org
commit

86a072e7fdbaa92744eb78ecc2e39e462477fd2e

parent

e1eb5e225b316a55aaab34547c20ad8c67168c3e

M ChangeLogChangeLog

@@ -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.
M doc/asciidoc/fluxbox.1doc/asciidoc/fluxbox.1

@@ -1755,18 +1755,6 @@

session\&.screen0\&.tab\&.width: <integer> This specifies the width of external tabs in pixels\&. Default: 64 -session\&.screen0\&.userFollowModel: <model> - 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: <model> - 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
M doc/asciidoc/fluxbox.txtdoc/asciidoc/fluxbox.txt

@@ -803,18 +803,6 @@

session.screen0.tab.width: <integer> This specifies the width of external tabs in pixels. Default: 64 -session.screen0.userFollowModel: <model> - 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: <model> - 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
M doc/fluxbox.1.indoc/fluxbox.1.in

@@ -1755,18 +1755,6 @@

session\&.screen0\&.tab\&.width: <integer> This specifies the width of external tabs in pixels\&. Default: 64 -session\&.screen0\&.userFollowModel: <model> - 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: <model> - 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
M src/Screen.ccsrc/Screen.cc

@@ -299,8 +299,6 @@ default_deco(rm, "NORMAL", scrname+".defaultDeco", altscrname+".DefaultDeco"),

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"),
M src/Screen.hhsrc/Screen.hh

@@ -85,15 +85,6 @@ */

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<FluxboxWindow *> Icons; typedef std::vector<Workspace *> Workspaces;

@@ -135,8 +126,6 @@

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 @@ FbTk::Resource<std::string> default_deco;

FbTk::Resource<FbWinFrame::TabPlacement> tab_placement; FbTk::Resource<std::string> windowmenufile; FbTk::Resource<unsigned int> typing_delay; - FbTk::Resource<FollowModel> follow_model, user_follow_model; FbTk::Resource<int> workspaces, edge_snap_threshold, focused_alpha, unfocused_alpha, menu_alpha, menu_delay, menu_delay_close, tab_width, tooltip_delay;
M src/ScreenResources.ccsrc/ScreenResources.cc

@@ -52,136 +52,4 @@ *(*this) = FbTk::MenuTheme::CLICK_OPEN;

else setDefaultValue(); } - -template<> -string FbTk::Resource<BScreen::FollowModel>::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<BScreen::FollowModel>:: -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<FbTk::GContext::LineStyle>::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<FbTk::GContext::LineStyle> -::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<FbTk::GContext::JoinStyle>::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<FbTk::GContext::JoinStyle> -::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<FbTk::GContext::CapStyle>::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<FbTk::GContext::CapStyle> -::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
M src/Window.ccsrc/Window.cc

@@ -1273,13 +1273,8 @@ return false;

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 @@ if (from.fbwindow() != this)

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();