aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-10-05 02:30:19 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-10-05 02:30:19 (GMT)
commit86a072e7fdbaa92744eb78ecc2e39e462477fd2e (patch)
treeabcd180f8255084061dd22b37dc4434387f1ff9d
parente1eb5e225b316a55aaab34547c20ad8c67168c3e (diff)
downloadfluxbox-86a072e7fdbaa92744eb78ecc2e39e462477fd2e.zip
fluxbox-86a072e7fdbaa92744eb78ecc2e39e462477fd2e.tar.bz2
remove follow models
-rw-r--r--ChangeLog2
-rw-r--r--doc/asciidoc/fluxbox.112
-rw-r--r--doc/asciidoc/fluxbox.txt12
-rw-r--r--doc/fluxbox.1.in12
-rw-r--r--src/Screen.cc2
-rw-r--r--src/Screen.hh12
-rw-r--r--src/ScreenResources.cc132
-rw-r--r--src/Window.cc15
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 @@
1 (Format: Year/Month/Day) 1 (Format: Year/Month/Day)
2Changes for 1.1.2 2Changes for 1.1.2
3*08/10/05: 3*08/10/05:
4 * Remove follow models (Mark)
5 Screen.cc/hh ScreenResources.cc Window.cc
4 * Remove line style resources from init file (Mark) 6 * Remove line style resources from init file (Mark)
5 Screen.cc/hh 7 Screen.cc/hh
6 * Remove rootcommand from init, as fbsetbg is run automatically nowadays. 8 * 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: <placement>
1755session\&.screen0\&.tab\&.width: <integer> 1755session\&.screen0\&.tab\&.width: <integer>
1756 This specifies the width of external tabs in pixels\&. Default: 64 1756 This specifies the width of external tabs in pixels\&. Default: 64
1757 1757
1758session\&.screen0\&.userFollowModel: <model>
1759 This specifies the behavior when a window on another workspace becomes the
1760 active window\&. `Ignore\' does nothing\&. `Follow\' moves to the window\'s
1761 workspace\&. `Current\' moves the window to the current workspace\&.
1762 `SemiFollow\' acts like `Current\' for minimized windows and like `Follow\'
1763 otherwise\&. Default: Follow
1764
1765session\&.screen0\&.followModel: <model>
1766 This specifies the behavior when a window on another workspace requests to
1767 be focused\&. `Ignore\' does nothing, and `Follow\' uses the setting in
1768 session\&.screen0\&.userFollowModel\&. Default: Ignore
1769
1770session\&.screen0\&.focusModel: ClickToFocus|MouseFocus 1758session\&.screen0\&.focusModel: ClickToFocus|MouseFocus
1771 This controls how windows gain focus via the mouse\&. With `ClickToFocus\', 1759 This controls how windows gain focus via the mouse\&. With `ClickToFocus\',
1772 the user must click on the window\&. With `MouseFocus\', windows gain focus 1760 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: <placement>
803session.screen0.tab.width: <integer> 803session.screen0.tab.width: <integer>
804 This specifies the width of external tabs in pixels. Default: 64 804 This specifies the width of external tabs in pixels. Default: 64
805 805
806session.screen0.userFollowModel: <model>
807 This specifies the behavior when a window on another workspace becomes the
808 active window. `Ignore' does nothing. `Follow' moves to the window's
809 workspace. `Current' moves the window to the current workspace.
810 `SemiFollow' acts like `Current' for minimized windows and like `Follow'
811 otherwise. Default: Follow
812
813session.screen0.followModel: <model>
814 This specifies the behavior when a window on another workspace requests to
815 be focused. `Ignore' does nothing, and `Follow' uses the setting in
816 session.screen0.userFollowModel. Default: Ignore
817
818session.screen0.focusModel: ClickToFocus|MouseFocus 806session.screen0.focusModel: ClickToFocus|MouseFocus
819 This controls how windows gain focus via the mouse. With `ClickToFocus', 807 This controls how windows gain focus via the mouse. With `ClickToFocus',
820 the user must click on the window. With `MouseFocus', windows gain focus 808 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: <placement>
1755session\&.screen0\&.tab\&.width: <integer> 1755session\&.screen0\&.tab\&.width: <integer>
1756 This specifies the width of external tabs in pixels\&. Default: 64 1756 This specifies the width of external tabs in pixels\&. Default: 64
1757 1757
1758session\&.screen0\&.userFollowModel: <model>
1759 This specifies the behavior when a window on another workspace becomes the
1760 active window\&. `Ignore\' does nothing\&. `Follow\' moves to the window\'s
1761 workspace\&. `Current\' moves the window to the current workspace\&.
1762 `SemiFollow\' acts like `Current\' for minimized windows and like `Follow\'
1763 otherwise\&. Default: Follow
1764
1765session\&.screen0\&.followModel: <model>
1766 This specifies the behavior when a window on another workspace requests to
1767 be focused\&. `Ignore\' does nothing, and `Follow\' uses the setting in
1768 session\&.screen0\&.userFollowModel\&. Default: Ignore
1769
1770session\&.screen0\&.focusModel: ClickToFocus|MouseFocus 1758session\&.screen0\&.focusModel: ClickToFocus|MouseFocus
1771 This controls how windows gain focus via the mouse\&. With `ClickToFocus\', 1759 This controls how windows gain focus via the mouse\&. With `ClickToFocus\',
1772 the user must click on the window\&. With `MouseFocus\', windows gain focus 1760 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,
299 tab_placement(rm, FbWinFrame::TOPLEFT, scrname+".tab.placement", altscrname+".Tab.Placement"), 299 tab_placement(rm, FbWinFrame::TOPLEFT, scrname+".tab.placement", altscrname+".Tab.Placement"),
300 windowmenufile(rm, Fluxbox::instance()->getDefaultDataFilename("windowmenu"), scrname+".windowMenu", altscrname+".WindowMenu"), 300 windowmenufile(rm, Fluxbox::instance()->getDefaultDataFilename("windowmenu"), scrname+".windowMenu", altscrname+".WindowMenu"),
301 typing_delay(rm, 0, scrname+".noFocusWhileTypingDelay", altscrname+".NoFocusWhileTypingDelay"), 301 typing_delay(rm, 0, scrname+".noFocusWhileTypingDelay", altscrname+".NoFocusWhileTypingDelay"),
302 follow_model(rm, SEMIFOLLOW_ACTIVE_WINDOW, scrname+".followModel", altscrname+".followModel"),
303 user_follow_model(rm, SEMIFOLLOW_ACTIVE_WINDOW, scrname+".userFollowModel", altscrname+".UserFollowModel"),
304 workspaces(rm, 4, scrname+".workspaces", altscrname+".Workspaces"), 302 workspaces(rm, 4, scrname+".workspaces", altscrname+".Workspaces"),
305 edge_snap_threshold(rm, 10, scrname+".edgeSnapThreshold", altscrname+".EdgeSnapThreshold"), 303 edge_snap_threshold(rm, 10, scrname+".edgeSnapThreshold", altscrname+".EdgeSnapThreshold"),
306 focused_alpha(rm, 255, scrname+".window.focus.alpha", altscrname+".Window.Focus.Alpha"), 304 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;
85class BScreen: public FbTk::EventHandler, public FbTk::Observer, 85class BScreen: public FbTk::EventHandler, public FbTk::Observer,
86 private FbTk::NotCopyable { 86 private FbTk::NotCopyable {
87public: 87public:
88 /// a window becomes active / focussed on a different workspace
89 enum FollowModel {
90 IGNORE_OTHER_WORKSPACES = 0, ///< who cares?
91 FOLLOW_ACTIVE_WINDOW, ///< go to that workspace
92 SEMIFOLLOW_ACTIVE_WINDOW, ///< fetch iconified windows, else follow
93 FETCH_ACTIVE_WINDOW ///< put that window to the current workspace
94 };
95
96
97 typedef std::list<FluxboxWindow *> Icons; 88 typedef std::list<FluxboxWindow *> Icons;
98 89
99 typedef std::vector<Workspace *> Workspaces; 90 typedef std::vector<Workspace *> Workspaces;
@@ -135,8 +126,6 @@ public:
135 FbWinFrame::TabPlacement getTabPlacement() const { return *resource.tab_placement; } 126 FbWinFrame::TabPlacement getTabPlacement() const { return *resource.tab_placement; }
136 127
137 unsigned int noFocusWhileTypingDelay() const { return *resource.typing_delay; } 128 unsigned int noFocusWhileTypingDelay() const { return *resource.typing_delay; }
138 FollowModel getFollowModel() const { return *resource.follow_model; }
139 FollowModel getUserFollowModel() const { return *resource.user_follow_model; }
140 const bool allowRemoteActions() const { return *resource.allow_remote_actions; } 129 const bool allowRemoteActions() const { return *resource.allow_remote_actions; }
141 const bool clientMenuUsePixmap() const { return *resource.clientmenu_use_pixmap; } 130 const bool clientMenuUsePixmap() const { return *resource.clientmenu_use_pixmap; }
142 const bool getDefaultInternalTabs() const { return *resource.default_internal_tabs; } 131 const bool getDefaultInternalTabs() const { return *resource.default_internal_tabs; }
@@ -555,7 +544,6 @@ private:
555 FbTk::Resource<FbWinFrame::TabPlacement> tab_placement; 544 FbTk::Resource<FbWinFrame::TabPlacement> tab_placement;
556 FbTk::Resource<std::string> windowmenufile; 545 FbTk::Resource<std::string> windowmenufile;
557 FbTk::Resource<unsigned int> typing_delay; 546 FbTk::Resource<unsigned int> typing_delay;
558 FbTk::Resource<FollowModel> follow_model, user_follow_model;
559 FbTk::Resource<int> workspaces, edge_snap_threshold, focused_alpha, 547 FbTk::Resource<int> workspaces, edge_snap_threshold, focused_alpha,
560 unfocused_alpha, menu_alpha, menu_delay, menu_delay_close, 548 unfocused_alpha, menu_alpha, menu_delay, menu_delay_close,
561 tab_width, tooltip_delay; 549 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<FbTk::MenuTheme::MenuMode>::setFromString(const char *str) {
52 else 52 else
53 setDefaultValue(); 53 setDefaultValue();
54} 54}
55
56template<>
57string FbTk::Resource<BScreen::FollowModel>::getString() const {
58 switch (m_value) {
59 case BScreen::FOLLOW_ACTIVE_WINDOW:
60 default:
61 return string("Follow");
62 break;
63 case BScreen::FETCH_ACTIVE_WINDOW:
64 return string("Current");
65 break;
66 case BScreen::SEMIFOLLOW_ACTIVE_WINDOW:
67 return string("SemiFollow");
68 break;
69 case BScreen::IGNORE_OTHER_WORKSPACES:
70 return string("Ignore");
71 break;
72 }
73
74}
75
76template<>
77void FbTk::Resource<BScreen::FollowModel>::
78setFromString(char const *strval) {
79 if (strcasecmp(strval, "Follow") == 0)
80 m_value = BScreen::FOLLOW_ACTIVE_WINDOW;
81 else if (strcasecmp(strval, "Current") == 0 ||
82 strcasecmp(strval, "CurrentWorkspace") == 0 ||
83 strcasecmp(strval, "Fetch") == 0)
84 m_value = BScreen::FETCH_ACTIVE_WINDOW;
85 else if (strcasecmp(strval, "SemiFollow") == 0)
86 m_value = BScreen::SEMIFOLLOW_ACTIVE_WINDOW;
87 else if (strcasecmp(strval, "Ignore") == 0)
88 m_value = BScreen::IGNORE_OTHER_WORKSPACES;
89 else
90 setDefaultValue();
91}
92
93template<>
94string FbTk::Resource<FbTk::GContext::LineStyle>::getString() const {
95 switch(m_value) {
96 case FbTk::GContext::LINESOLID:
97 return "LineSolid";
98 break;
99 case FbTk::GContext::LINEONOFFDASH:
100 return "LineOnOffDash";
101 break;
102 case FbTk::GContext::LINEDOUBLEDASH:
103 return "LineDoubleDash";
104 break;
105 };
106 return "LineSolid";
107}
108
109template<>
110void FbTk::Resource<FbTk::GContext::LineStyle>
111::setFromString(char const *strval) {
112
113 if (strcasecmp(strval, "LineSolid") == 0 )
114 m_value = FbTk::GContext::LINESOLID;
115 else if (strcasecmp(strval, "LineOnOffDash") == 0 )
116 m_value = FbTk::GContext::LINEONOFFDASH;
117 else if (strcasecmp(strval, "LineDoubleDash") == 0)
118 m_value = FbTk::GContext::LINEDOUBLEDASH;
119 else
120 setDefaultValue();
121}
122
123template<>
124string FbTk::Resource<FbTk::GContext::JoinStyle>::getString() const {
125 switch(m_value) {
126 case FbTk::GContext::JOINMITER:
127 return "JoinMiter";
128 break;
129 case FbTk::GContext::JOINBEVEL:
130 return "JoinBevel";
131 break;
132 case FbTk::GContext::JOINROUND:
133 return "JoinRound";
134 break;
135 };
136 return "JoinMiter";
137}
138
139template<>
140void FbTk::Resource<FbTk::GContext::JoinStyle>
141::setFromString(char const *strval) {
142
143 if (strcasecmp(strval, "JoinRound") == 0 )
144 m_value = FbTk::GContext::JOINROUND;
145 else if (strcasecmp(strval, "JoinMiter") == 0 )
146 m_value = FbTk::GContext::JOINMITER;
147 else if (strcasecmp(strval, "JoinBevel") == 0)
148 m_value = FbTk::GContext::JOINBEVEL;
149 else
150 setDefaultValue();
151}
152
153template<>
154string FbTk::Resource<FbTk::GContext::CapStyle>::getString() const {
155 switch(m_value) {
156 case FbTk::GContext::CAPNOTLAST:
157 return "CapNotLast";
158 break;
159 case FbTk::GContext::CAPBUTT:
160 return "CapButt";
161 break;
162 case FbTk::GContext::CAPROUND:
163 return "CapRound";
164 break;
165 case FbTk::GContext::CAPPROJECTING:
166 return "CapProjecting";
167 break;
168 };
169 return "CapNotLast";
170}
171
172template<>
173void FbTk::Resource<FbTk::GContext::CapStyle>
174::setFromString(char const *strval) {
175
176 if (strcasecmp(strval, "CapNotLast") == 0 )
177 m_value = FbTk::GContext::CAPNOTLAST;
178 else if (strcasecmp(strval, "CapProjecting") == 0 )
179 m_value = FbTk::GContext::CAPPROJECTING;
180 else if (strcasecmp(strval, "CapRound") == 0)
181 m_value = FbTk::GContext::CAPROUND;
182 else if (strcasecmp(strval, "CapButt" ) == 0)
183 m_value = FbTk::GContext::CAPBUTT;
184 else
185 setDefaultValue();
186}
187} // end namespace FbTk 55} // 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() {
1273 1273
1274 if (screen().currentWorkspaceID() != workspaceNumber() && !isStuck()) { 1274 if (screen().currentWorkspaceID() != workspaceNumber() && !isStuck()) {
1275 1275
1276 BScreen::FollowModel model = screen().getUserFollowModel(); 1276 // fetch the window to the current workspace if minimized
1277 if (model == BScreen::IGNORE_OTHER_WORKSPACES) 1277 if (isIconic())
1278 return false;
1279
1280 // fetch the window to the current workspace
1281 if (model == BScreen::FETCH_ACTIVE_WINDOW ||
1282 (isIconic() && model == BScreen::SEMIFOLLOW_ACTIVE_WINDOW))
1283 screen().sendToWorkspace(screen().currentWorkspaceID(), this, false); 1278 screen().sendToWorkspace(screen().currentWorkspaceID(), this, false);
1284 // warp to the workspace of the window 1279 // warp to the workspace of the window
1285 else 1280 else
@@ -2041,14 +2036,10 @@ bool FluxboxWindow::focusRequestFromClient(WinClient &from) {
2041 return false; 2036 return false;
2042 2037
2043 bool ret = true; 2038 bool ret = true;
2044 // check what to do if window is on another workspace
2045 if (screen().currentWorkspaceID() != workspaceNumber() && !isStuck() &&
2046 screen().getFollowModel() == BScreen::IGNORE_OTHER_WORKSPACES)
2047 ret = false;
2048 2039
2049 FluxboxWindow *cur = FocusControl::focusedFbWindow(); 2040 FluxboxWindow *cur = FocusControl::focusedFbWindow();
2050 WinClient *client = FocusControl::focusedWindow(); 2041 WinClient *client = FocusControl::focusedWindow();
2051 if (ret && cur && getRootTransientFor(&from) != getRootTransientFor(client)) 2042 if (cur && getRootTransientFor(&from) != getRootTransientFor(client))
2052 ret = !(cur->isFullscreen() && getOnHead() == cur->getOnHead()) && 2043 ret = !(cur->isFullscreen() && getOnHead() == cur->getOnHead()) &&
2053 !cur->isTyping(); 2044 !cur->isTyping();
2054 2045