aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Screen.cc5
-rw-r--r--src/Screen.hh8
-rw-r--r--src/fluxbox.cc66
3 files changed, 15 insertions, 64 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 9ca7859..b9a3b21 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Screen.cc,v 1.113 2003/02/22 15:10:43 rathnor Exp $ 25// $Id: Screen.cc,v 1.114 2003/02/22 16:09:44 rathnor Exp $
26 26
27 27
28#include "Screen.hh" 28#include "Screen.hh"
@@ -361,6 +361,7 @@ BScreen::ScreenResource::ScreenResource(ResourceManager &rm,
361 focus_last(rm, true, scrname+".focusLastWindow", altscrname+".FocusLastWindow"), 361 focus_last(rm, true, scrname+".focusLastWindow", altscrname+".FocusLastWindow"),
362 focus_new(rm, true, scrname+".focusNewWindows", altscrname+".FocusNewWindows"), 362 focus_new(rm, true, scrname+".focusNewWindows", altscrname+".FocusNewWindows"),
363 antialias(rm, false, scrname+".antialias", altscrname+".Antialias"), 363 antialias(rm, false, scrname+".antialias", altscrname+".Antialias"),
364 auto_raise(rm, false, scrname+".autoRaise", altscrname+".AutoRaise"),
364 rootcommand(rm, "", scrname+".rootCommand", altscrname+".RootCommand"), 365 rootcommand(rm, "", scrname+".rootCommand", altscrname+".RootCommand"),
365 focus_model(rm, Fluxbox::CLICKTOFOCUS, scrname+".focusModel", altscrname+".FocusModel"), 366 focus_model(rm, Fluxbox::CLICKTOFOCUS, scrname+".focusModel", altscrname+".FocusModel"),
366 workspaces(rm, 1, scrname+".workspaces", altscrname+".Workspaces"), 367 workspaces(rm, 1, scrname+".workspaces", altscrname+".Workspaces"),
@@ -1758,7 +1759,7 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
1758 ConfigmenuSet, 1759 ConfigmenuSet,
1759 ConfigmenuAutoRaise, 1760 ConfigmenuAutoRaise,
1760 "Auto Raise"), 1761 "Auto Raise"),
1761 resource.auto_raise, 1762 *resource.auto_raise,
1762 save_and_reconfigure)); 1763 save_and_reconfigure));
1763 1764
1764 focus_menu->update(); 1765 focus_menu->update();
diff --git a/src/Screen.hh b/src/Screen.hh
index a30ca40..9488f3c 100644
--- a/src/Screen.hh
+++ b/src/Screen.hh
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Screen.hh,v 1.70 2003/02/22 15:10:43 rathnor Exp $ 25// $Id: Screen.hh,v 1.71 2003/02/22 16:09:44 rathnor Exp $
26 26
27#ifndef SCREEN_HH 27#ifndef SCREEN_HH
28#define SCREEN_HH 28#define SCREEN_HH
@@ -87,7 +87,7 @@ public:
87 inline bool isSloppyWindowGrouping() const { return *resource.sloppy_window_grouping; } 87 inline bool isSloppyWindowGrouping() const { return *resource.sloppy_window_grouping; }
88 inline bool isWorkspaceWarping() const { return *resource.workspace_warping; } 88 inline bool isWorkspaceWarping() const { return *resource.workspace_warping; }
89 inline bool isDesktopWheeling() const { return *resource.desktop_wheeling; } 89 inline bool isDesktopWheeling() const { return *resource.desktop_wheeling; }
90 inline bool doAutoRaise() const { return resource.auto_raise; } 90 inline bool doAutoRaise() const { return *resource.auto_raise; }
91 inline bool doImageDither() const { return *resource.image_dither; } 91 inline bool doImageDither() const { return *resource.image_dither; }
92 inline bool doMaxOverSlit() const { return *resource.max_over_slit; } 92 inline bool doMaxOverSlit() const { return *resource.max_over_slit; }
93 inline bool doOpaqueMove() const { return *resource.opaque_move; } 93 inline bool doOpaqueMove() const { return *resource.opaque_move; }
@@ -382,10 +382,10 @@ private:
382 sloppy_window_grouping, workspace_warping, 382 sloppy_window_grouping, workspace_warping,
383 desktop_wheeling, show_window_pos, 383 desktop_wheeling, show_window_pos,
384 focus_last, focus_new, 384 focus_last, focus_new,
385 antialias; 385 antialias, auto_raise;
386 Resource<std::string> rootcommand; 386 Resource<std::string> rootcommand;
387 Resource<Fluxbox::FocusModel> focus_model; 387 Resource<Fluxbox::FocusModel> focus_model;
388 bool auto_raise, ordered_dither; 388 bool ordered_dither;
389 Resource<int> workspaces, toolbar_width_percent, edge_snap_threshold, 389 Resource<int> workspaces, toolbar_width_percent, edge_snap_threshold,
390 tab_width, tab_height; 390 tab_width, tab_height;
391 Resource<Fluxbox::Layer> slit_layernum, toolbar_layernum; 391 Resource<Fluxbox::Layer> slit_layernum, toolbar_layernum;
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index 1cb66a9..4caf6f0 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: fluxbox.cc,v 1.98 2003/02/22 15:10:43 rathnor Exp $ 25// $Id: fluxbox.cc,v 1.99 2003/02/22 16:09:44 rathnor Exp $
26 26
27 27
28#include "fluxbox.hh" 28#include "fluxbox.hh"
@@ -172,9 +172,14 @@ setFromString(char const *strval) {
172template<> 172template<>
173void Resource<Fluxbox::FocusModel>:: 173void Resource<Fluxbox::FocusModel>::
174setFromString(char const *strval) { 174setFromString(char const *strval) {
175 if (strcasecmp(strval, "SloppyFocus") == 0) 175 // auto raise options here for backwards read compatibility
176 // they are not supported for saving purposes. Nor does the "AutoRaise"
177 // part actually do anything
178 if (strcasecmp(strval, "SloppyFocus") == 0
179 || strcasecmp(strval, "AutoRaiseSloppyFocus") == 0)
176 m_value = Fluxbox::SLOPPYFOCUS; 180 m_value = Fluxbox::SLOPPYFOCUS;
177 else if (strcasecmp(strval, "SemiSloppyFocus") == 0) 181 else if (strcasecmp(strval, "SemiSloppyFocus") == 0
182 || strcasecmp(strval, "AutoRaiseSemiSloppyFocus") == 0)
178 m_value = Fluxbox::SEMISLOPPYFOCUS; 183 m_value = Fluxbox::SEMISLOPPYFOCUS;
179 else if (strcasecmp(strval, "ClickToFocus") == 0) 184 else if (strcasecmp(strval, "ClickToFocus") == 0)
180 m_value = Fluxbox::CLICKTOFOCUS; 185 m_value = Fluxbox::CLICKTOFOCUS;
@@ -1744,24 +1749,6 @@ void Fluxbox::save_rc() {
1744 placement.c_str()); 1749 placement.c_str());
1745 XrmPutLineResource(&new_blackboxrc, rc_string); 1750 XrmPutLineResource(&new_blackboxrc, rc_string);
1746 1751
1747 //TODO
1748/*
1749 std::string focus_mode;
1750 if (screen->isSloppyFocus() && screen->doAutoRaise())
1751 focus_mode = "AutoRaiseSloppyFocus";
1752 else if (screen->isSloppyFocus())
1753 focus_mode = "SloppyFocus";
1754 else if (screen->isSemiSloppyFocus() && screen->doAutoRaise())
1755 focus_mode = "AutoRaiseSemiSloppyFocus";
1756 else if (screen->isSemiSloppyFocus())
1757 focus_mode = "SemiSloppyFocus";
1758 else
1759 focus_mode = "ClickToFocus";
1760
1761 sprintf(rc_string, "session.screen%d.focusModel: %s", screen_number,
1762 focus_mode.c_str());
1763 XrmPutLineResource(&new_blackboxrc, rc_string);
1764*/
1765 // load_rc(screen); 1752 // load_rc(screen);
1766 // these are static, but may not be saved in the users resource file, 1753 // these are static, but may not be saved in the users resource file,
1767 // writing these resources will allow the user to edit them at a later 1754 // writing these resources will allow the user to edit them at a later
@@ -1988,43 +1975,6 @@ void Fluxbox::load_rc(BScreen *screen) {
1988 delete [] search; 1975 delete [] search;
1989 } 1976 }
1990 1977
1991//TODO (use Fluxbox::FocusModel enum)
1992 /*
1993 sprintf(name_lookup, "session.screen%d.focusModel", screen_number);
1994 sprintf(class_lookup, "Session.Screen%d.FocusModel", screen_number);
1995 if (XrmGetResource(*database, name_lookup, class_lookup, &value_type,
1996 &value)) {
1997 if (! strncasecmp(value.addr, "clicktofocus", value.size)) {
1998 screen->saveAutoRaise(false);
1999 screen->saveSloppyFocus(false);
2000 screen->saveSemiSloppyFocus(false);
2001
2002 } else if (! strncasecmp(value.addr, "autoraisesloppyfocus", value.size)) {
2003 screen->saveSemiSloppyFocus(false);
2004 screen->saveSloppyFocus(true);
2005 screen->saveAutoRaise(true);
2006 } else if (! strncasecmp(value.addr, "autoraisesemisloppyfocus", value.size)) {
2007 screen->saveSloppyFocus(false);
2008 screen->saveSemiSloppyFocus(true);
2009 screen->saveAutoRaise(true);
2010
2011 } else if (! strncasecmp(value.addr, "semisloppyfocus", value.size)) {
2012 screen->saveSloppyFocus(false);
2013 screen->saveSemiSloppyFocus(true);
2014 screen->saveAutoRaise(false);
2015
2016 } else {
2017
2018 screen->saveSemiSloppyFocus(false);
2019 screen->saveSloppyFocus(true);
2020 screen->saveAutoRaise(false);
2021 }
2022 } else {
2023 screen->saveSemiSloppyFocus(false);
2024 screen->saveSloppyFocus(true);
2025 screen->saveAutoRaise(false);
2026 }
2027 */
2028 sprintf(name_lookup, "session.screen%d.windowPlacement", screen_number); 1978 sprintf(name_lookup, "session.screen%d.windowPlacement", screen_number);
2029 sprintf(class_lookup, "Session.Screen%d.WindowPlacement", screen_number); 1979 sprintf(class_lookup, "Session.Screen%d.WindowPlacement", screen_number);
2030 if (XrmGetResource(*database, name_lookup, class_lookup, &value_type, 1980 if (XrmGetResource(*database, name_lookup, class_lookup, &value_type,