aboutsummaryrefslogtreecommitdiff
path: root/src/ScreenResources.cc
diff options
context:
space:
mode:
authormathias <mathias>2005-07-20 18:29:01 (GMT)
committermathias <mathias>2005-07-20 18:29:01 (GMT)
commit460dffdcc1f2de5463225feedd7d02f6f27958c2 (patch)
tree2e76bc31a08544a423e018c94ac9b06f7965684e /src/ScreenResources.cc
parent3e16ad8cf8be40a1868b6c133649d6549a755761 (diff)
downloadfluxbox-460dffdcc1f2de5463225feedd7d02f6f27958c2.zip
fluxbox-460dffdcc1f2de5463225feedd7d02f6f27958c2.tar.bz2
Changed some *Focus options, just to make some things a bit more clear.
the "Sloppy" was always a bit .. unprecise. removed SloppyFocus, SemiSloppyFocus and ClickToFocus options added MouseFocus, ClickFocus, MouseTabFocus, ClickTabFocus - MouseFocus - change the focus to the window under the mouse (almost similar to the 'old' SloppyFocus) - ClickFocus - change the focus to the window the user clicks - MouseTabFocus - change active tabclient to the one under the mouse in titlebar, does NOT change the focus - ClickTabFocus - change active tabclient when clicked onto a tabbutton to achieve former SemiSloppyFocus behavior one needs MouseFocus and ClickTabFocus
Diffstat (limited to 'src/ScreenResources.cc')
-rw-r--r--src/ScreenResources.cc49
1 files changed, 32 insertions, 17 deletions
diff --git a/src/ScreenResources.cc b/src/ScreenResources.cc
index dd42b18..db92b19 100644
--- a/src/ScreenResources.cc
+++ b/src/ScreenResources.cc
@@ -176,31 +176,46 @@ template<>
176std::string FbTk::Resource<BScreen::FocusModel>:: 176std::string FbTk::Resource<BScreen::FocusModel>::
177getString() { 177getString() {
178 switch (m_value) { 178 switch (m_value) {
179 case BScreen::SLOPPYFOCUS: 179 case BScreen::MOUSEFOCUS:
180 return string("SloppyFocus"); 180 return string("MouseFocus");
181 case BScreen::SEMISLOPPYFOCUS: 181 case BScreen::CLICKFOCUS:
182 return string("SemiSloppyFocus"); 182 return string("ClickFocus");
183 case BScreen::CLICKTOFOCUS:
184 return string("ClickToFocus");
185 } 183 }
186 // default string 184 // default string
187 return string("ClickToFocus"); 185 return string("ClickFocus");
188} 186}
189 187
190template<> 188template<>
191void FbTk::Resource<BScreen::FocusModel>:: 189void FbTk::Resource<BScreen::FocusModel>::
192setFromString(char const *strval) { 190setFromString(char const *strval) {
193 // auto raise options here for backwards read compatibility 191 if (strcasecmp(strval, "MouseFocus") == 0)
194 // they are not supported for saving purposes. Nor does the "AutoRaise" 192 m_value = BScreen::MOUSEFOCUS;
195 // part actually do anything
196 if (strcasecmp(strval, "SloppyFocus") == 0
197 || strcasecmp(strval, "AutoRaiseSloppyFocus") == 0)
198 m_value = BScreen::SLOPPYFOCUS;
199 else if (strcasecmp(strval, "SemiSloppyFocus") == 0
200 || strcasecmp(strval, "AutoRaiseSemiSloppyFocus") == 0)
201 m_value = BScreen::SEMISLOPPYFOCUS;
202 else if (strcasecmp(strval, "ClickToFocus") == 0) 193 else if (strcasecmp(strval, "ClickToFocus") == 0)
203 m_value = BScreen::CLICKTOFOCUS; 194 m_value = BScreen::CLICKFOCUS;
195 else
196 setDefaultValue();
197}
198
199template<>
200std::string FbTk::Resource<BScreen::TabFocusModel>::
201getString() {
202 switch (m_value) {
203 case BScreen::MOUSETABFOCUS:
204 return string("SloppyTabFocus");
205 case BScreen::CLICKTABFOCUS:
206 return string("ClickToTabFocus");
207 }
208 // default string
209 return string("ClickToTabFocus");
210}
211
212template<>
213void FbTk::Resource<BScreen::TabFocusModel>::
214setFromString(char const *strval) {
215 if (strcasecmp(strval, "SloppyTabFocus") == 0 )
216 m_value = BScreen::MOUSETABFOCUS;
217 else if (strcasecmp(strval, "ClickToTabFocus") == 0)
218 m_value = BScreen::CLICKTABFOCUS;
204 else 219 else
205 setDefaultValue(); 220 setDefaultValue();
206} 221}