remove follow models

This commit is contained in:
Mark Tiefenbruck 2008-10-04 19:30:19 -07:00
parent e1eb5e225b
commit 86a072e7fd
8 changed files with 5 additions and 194 deletions

View file

@ -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.

View file

@ -1755,18 +1755,6 @@ session\&.screen0\&.tab\&.placement: <placement>
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

View file

@ -803,18 +803,6 @@ session.screen0.tab.placement: <placement>
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

View file

@ -1755,18 +1755,6 @@ session\&.screen0\&.tab\&.placement: <placement>
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

View file

@ -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"),

View file

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

View file

@ -52,136 +52,4 @@ void FbTk::Resource<FbTk::MenuTheme::MenuMode>::setFromString(const char *str) {
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

View file

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