diff options
author | mathias <mathias> | 2005-07-20 18:29:01 (GMT) |
---|---|---|
committer | mathias <mathias> | 2005-07-20 18:29:01 (GMT) |
commit | 460dffdcc1f2de5463225feedd7d02f6f27958c2 (patch) | |
tree | 2e76bc31a08544a423e018c94ac9b06f7965684e /src/ScreenResources.cc | |
parent | 3e16ad8cf8be40a1868b6c133649d6549a755761 (diff) | |
download | fluxbox-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.cc | 49 |
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<> | |||
176 | std::string FbTk::Resource<BScreen::FocusModel>:: | 176 | std::string FbTk::Resource<BScreen::FocusModel>:: |
177 | getString() { | 177 | getString() { |
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 | ||
190 | template<> | 188 | template<> |
191 | void FbTk::Resource<BScreen::FocusModel>:: | 189 | void FbTk::Resource<BScreen::FocusModel>:: |
192 | setFromString(char const *strval) { | 190 | setFromString(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 | |||
199 | template<> | ||
200 | std::string FbTk::Resource<BScreen::TabFocusModel>:: | ||
201 | getString() { | ||
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 | |||
212 | template<> | ||
213 | void FbTk::Resource<BScreen::TabFocusModel>:: | ||
214 | setFromString(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 | } |