aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-08-02 11:56:31 (GMT)
committerPavel Labath <pavelo@centrum.sk>2013-02-18 21:04:25 (GMT)
commitd9be60362f364145daeaa21dcea99d0fff4c1203 (patch)
treeba967b97366967c49db552bf9af26061e70a6813
parentff9a9752654e8958ca66c8f8c7f3d1621295ca03 (diff)
downloadfluxbox_pavel-d9be60362f364145daeaa21dcea99d0fff4c1203.zip
fluxbox_pavel-d9be60362f364145daeaa21dcea99d0fff4c1203.tar.bz2
Automatically save init file when a resource is modified
previously, init was autosaved only when a resource was modified using the menu. I have also included modifications through lua code. To avoid wasting resources, the file is not saved immediately, but with a 5 second delay (to enable saving a bunch of changes in one go)
-rw-r--r--src/FbTk/LResource.cc21
-rw-r--r--src/FbTk/LResource.hh11
-rw-r--r--src/FbTk/Resource.hh11
-rw-r--r--src/Screen.cc57
-rw-r--r--src/fluxbox.cc2
5 files changed, 62 insertions, 40 deletions
diff --git a/src/FbTk/LResource.cc b/src/FbTk/LResource.cc
index 31362bd..de90b95 100644
--- a/src/FbTk/LResource.cc
+++ b/src/FbTk/LResource.cc
@@ -26,8 +26,11 @@
26 26
27#include "I18n.hh" 27#include "I18n.hh"
28#include "LuaUtil.hh" 28#include "LuaUtil.hh"
29#include "MemFun.hh"
29#include "Resource.hh" 30#include "Resource.hh"
30 31
32// defined in LResourceHelper-lua.cc
33// contains the compiled code of LResourceHelper.lua
31extern const char LResourceHelper[]; 34extern const char LResourceHelper[];
32extern const unsigned int LResourceHelper_size; 35extern const unsigned int LResourceHelper_size;
33 36
@@ -101,8 +104,15 @@ void LResourceManager::convert(ResourceManager &old, const std::string &new_file
101 new_rm.save(new_file.c_str(), NULL); 104 new_rm.save(new_file.c_str(), NULL);
102} 105}
103 106
104LResourceManager::LResourceManager(const std::string &root, Lua &l) 107LResourceManager::LResourceManager(const std::string &root, Lua &l, unsigned int autosave)
105 : ResourceManager_base(root), m_l(&l) { 108 : ResourceManager_base(root), m_l(&l) {
109
110 m_savetimer.setInterval(autosave);
111 m_savetimer.fireOnce(true);
112 m_savetimer.setFunctor( MemFunBind(*this, &LResourceManager::save,
113 static_cast<const char *>(NULL), static_cast<const char *>(NULL)
114 ) );
115
106 setLua(l); 116 setLua(l);
107} 117}
108 118
@@ -143,6 +153,8 @@ bool LResourceManager::save(const char *filename, const char *) {
143 if(filename == NULL) 153 if(filename == NULL)
144 filename = m_filename.c_str(); 154 filename = m_filename.c_str();
145 155
156 std::cerr << "XXX SAVING " << filename << std::endl;
157
146 m_l->getfield(lua::REGISTRYINDEX, dump_resources); 158 m_l->getfield(lua::REGISTRYINDEX, dump_resources);
147 m_l->getfield(lua::GLOBALSINDEX, m_root.c_str()); 159 m_l->getfield(lua::GLOBALSINDEX, m_root.c_str());
148 m_l->pushstring(filename); 160 m_l->pushstring(filename);
@@ -194,6 +206,11 @@ void LResourceManager::doRemoveResource(Resource_base &r) {
194 m_l->pop(); 206 m_l->pop();
195} 207}
196 208
209void LResourceManager::resourceChanged(Resource_base &r) {
210 if(! m_savetimer.isTiming())
211 m_savetimer.start();
212}
213
197void LResourceManager::setLua(Lua &l) { 214void LResourceManager::setLua(Lua &l) {
198 l.checkstack(2); 215 l.checkstack(2);
199 lua::stack_sentry s(l); 216 lua::stack_sentry s(l);
diff --git a/src/FbTk/LResource.hh b/src/FbTk/LResource.hh
index f0f8050..30f0e02 100644
--- a/src/FbTk/LResource.hh
+++ b/src/FbTk/LResource.hh
@@ -28,6 +28,7 @@
28#include <string> 28#include <string>
29 29
30#include "Resource.hh" 30#include "Resource.hh"
31#include "Timer.hh"
31 32
32namespace FbTk { 33namespace FbTk {
33 34
@@ -37,11 +38,18 @@ class LResourceManager: public ResourceManager_base {
37public: 38public:
38 static void convert(ResourceManager &old, const std::string &new_file); 39 static void convert(ResourceManager &old, const std::string &new_file);
39 40
40 LResourceManager(const std::string &root, Lua &l); 41 /**
42 * @param root the name of the table where settings will reside
43 * @param l lua context
44 * @param autosave delay (in seconds) for automatic saving of resources. Modifying a resource
45 * starts a timer. If another resource is modified, the timer is restarted. 0 = disabled
46 */
47 LResourceManager(const std::string &root, Lua &l, unsigned int autosave = 0);
41 void load(const std::string &filename, const std::string &fallback); 48 void load(const std::string &filename, const std::string &fallback);
42 virtual bool save(const char *filename, const char *); 49 virtual bool save(const char *filename, const char *);
43 virtual void addResource(Resource_base &r); 50 virtual void addResource(Resource_base &r);
44 virtual void removeResource(Resource_base &r); 51 virtual void removeResource(Resource_base &r);
52 virtual void resourceChanged(Resource_base &r);
45 void setLua(Lua &l); 53 void setLua(Lua &l);
46 54
47private: 55private:
@@ -50,6 +58,7 @@ private:
50 58
51 Lua *m_l; 59 Lua *m_l;
52 std::string m_filename; 60 std::string m_filename;
61 Timer m_savetimer;
53}; 62};
54 63
55} // end namespace FbTk 64} // end namespace FbTk
diff --git a/src/FbTk/Resource.hh b/src/FbTk/Resource.hh
index 7a797a1..c4a7951 100644
--- a/src/FbTk/Resource.hh
+++ b/src/FbTk/Resource.hh
@@ -96,8 +96,6 @@ public:
96 /// @return true on success 96 /// @return true on success
97 virtual bool save(const char *filename, const char *mergefilename=0) = 0; 97 virtual bool save(const char *filename, const char *mergefilename=0) = 0;
98 98
99
100
101 /// Add resource to list, only used in Resource<T> 99 /// Add resource to list, only used in Resource<T>
102 virtual void addResource(Resource_base &r); 100 virtual void addResource(Resource_base &r);
103 101
@@ -106,6 +104,9 @@ public:
106 m_resourcelist.remove(&r); 104 m_resourcelist.remove(&r);
107 } 105 }
108 106
107 /// Called by Resources when their value changes
108 virtual void resourceChanged(Resource_base &r) = 0;
109
109 /// searches for the resource with the resourcename 110 /// searches for the resource with the resourcename
110 /// @return pointer to resource base on success, else 0. 111 /// @return pointer to resource base on success, else 0.
111 Resource_base *findResource(const std::string &resourcename); 112 Resource_base *findResource(const std::string &resourcename);
@@ -154,6 +155,8 @@ public:
154 /// Add resource to list, only used in Resource<T> 155 /// Add resource to list, only used in Resource<T>
155 virtual void addResource(Resource_base &r); 156 virtual void addResource(Resource_base &r);
156 157
158 virtual void resourceChanged(Resource_base &r) {};
159
157 // this marks the database as "in use" and will avoid reloading 160 // this marks the database as "in use" and will avoid reloading
158 // resources unless it is zero. 161 // resources unless it is zero.
159 // It returns this resource manager. Useful for passing to 162 // It returns this resource manager. Useful for passing to
@@ -211,12 +214,14 @@ public:
211 214
212 void setDefaultValue() { 215 void setDefaultValue() {
213 m_value = m_defaultval; 216 m_value = m_defaultval;
217 m_rm.resourceChanged(*this);
214 m_modified_sig.emit(m_value); 218 m_modified_sig.emit(m_value);
215 } 219 }
216 /// sets resource from string, specialized, must be implemented 220 /// sets resource from string, specialized, must be implemented
217 void setFromString(const char *strval) { 221 void setFromString(const char *strval) {
218 try { 222 try {
219 m_value = Traits::fromString(strval); 223 m_value = Traits::fromString(strval);
224 m_rm.resourceChanged(*this);
220 m_modified_sig.emit(m_value); 225 m_modified_sig.emit(m_value);
221 } 226 }
222 catch(ConversionError &e) { 227 catch(ConversionError &e) {
@@ -226,6 +231,7 @@ public:
226 } 231 }
227 Accessor<T> &operator =(const T& newvalue) { 232 Accessor<T> &operator =(const T& newvalue) {
228 m_value = newvalue; 233 m_value = newvalue;
234 m_rm.resourceChanged(*this);
229 m_modified_sig.emit(m_value); 235 m_modified_sig.emit(m_value);
230 return *this; 236 return *this;
231 } 237 }
@@ -236,6 +242,7 @@ public:
236 virtual void setFromLua(lua::state &l) { 242 virtual void setFromLua(lua::state &l) {
237 try { 243 try {
238 m_value = Traits::fromLua(l); 244 m_value = Traits::fromLua(l);
245 m_rm.resourceChanged(*this);
239 m_modified_sig.emit(m_value); 246 m_modified_sig.emit(m_value);
240 } 247 }
241 catch(ConversionError &e) { 248 catch(ConversionError &e) {
diff --git a/src/Screen.cc b/src/Screen.cc
index 44f0eba..8ffaf4f 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -186,9 +186,8 @@ int calcSquareDistance(int x1, int y1, int x2, int y2) {
186class TabPlacementMenuItem: public FbTk::RadioMenuItem { 186class TabPlacementMenuItem: public FbTk::RadioMenuItem {
187public: 187public:
188 TabPlacementMenuItem(const FbTk::FbString & label, BScreen &screen, 188 TabPlacementMenuItem(const FbTk::FbString & label, BScreen &screen,
189 FbWinFrame::TabPlacement place, 189 FbWinFrame::TabPlacement place):
190 FbTk::RefCount<FbTk::Command<void> > &cmd): 190 FbTk::RadioMenuItem(label),
191 FbTk::RadioMenuItem(label, cmd),
192 m_screen(screen), 191 m_screen(screen),
193 m_place(place) { 192 m_place(place) {
194 setCloseOnClick(false); 193 setCloseOnClick(false);
@@ -1512,15 +1511,8 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
1512 1511
1513 menu.removeAll(); 1512 menu.removeAll();
1514 1513
1515 FbTk::MacroCommand *s_a_reconf_macro = new FbTk::MacroCommand();
1516 FbTk::RefCount<FbTk::Command<void> > saverc_cmd(new FbTk::SimpleCommand<Fluxbox>(
1517 *Fluxbox::instance(),
1518 &Fluxbox::save_rc));
1519 FbTk::RefCount<FbTk::Command<void> > reconf_cmd(FbTk::CommandParser<void>::instance().parse("reconfigure")); 1514 FbTk::RefCount<FbTk::Command<void> > reconf_cmd(FbTk::CommandParser<void>::instance().parse("reconfigure"));
1520 1515
1521 s_a_reconf_macro->add(saverc_cmd);
1522 s_a_reconf_macro->add(reconf_cmd);
1523 FbTk::RefCount<FbTk::Command<void> > save_and_reconfigure(s_a_reconf_macro);
1524 // create focus menu 1516 // create focus menu
1525 // we don't set this to internal menu so will 1517 // we don't set this to internal menu so will
1526 // be deleted toghether with the parent 1518 // be deleted toghether with the parent
@@ -1529,12 +1521,12 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
1529 "Method used to give focus to windows"); 1521 "Method used to give focus to windows");
1530 FbTk::RefCount<FbTk::Menu> focus_menu( createMenu(focusmenu_label) ); 1522 FbTk::RefCount<FbTk::Menu> focus_menu( createMenu(focusmenu_label) );
1531 1523
1532#define _BOOLITEM(m,a, b, c, d, e, f) (m).insert(new FbTk::BoolMenuItem(_FB_XTEXT(a, b, c, d), e, f)) 1524#define _BOOLITEM(m,a, b, c, d, e) (m).insert(new FbTk::BoolMenuItem(_FB_XTEXT(a, b, c, d), e))
1533 1525
1534 1526
1535#define _FOCUSITEM(a, b, c, d, e) \ 1527#define _FOCUSITEM(a, b, c, d, e) \
1536 focus_menu->insert(new FocusModelMenuItem(_FB_XTEXT(a, b, c, d), focusControl(), \ 1528 focus_menu->insert(new FocusModelMenuItem(_FB_XTEXT(a, b, c, d), focusControl(), \
1537 e, save_and_reconfigure)) 1529 e, reconf_cmd))
1538 1530
1539 _FOCUSITEM(Configmenu, ClickFocus, 1531 _FOCUSITEM(Configmenu, ClickFocus,
1540 "Click To Focus", "Click to focus", 1532 "Click To Focus", "Click to focus",
@@ -1552,17 +1544,16 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
1552 focus_menu->insert(new FbTk::MenuSeparator()); 1544 focus_menu->insert(new FbTk::MenuSeparator());
1553 focus_menu->insert(new TabFocusModelMenuItem(_FB_XTEXT(Configmenu, 1545 focus_menu->insert(new TabFocusModelMenuItem(_FB_XTEXT(Configmenu,
1554 ClickTabFocus, "ClickTabFocus", "Click tab to focus windows"), 1546 ClickTabFocus, "ClickTabFocus", "Click tab to focus windows"),
1555 focusControl(), FocusControl::CLICKTABFOCUS, save_and_reconfigure)); 1547 focusControl(), FocusControl::CLICKTABFOCUS, reconf_cmd));
1556 focus_menu->insert(new TabFocusModelMenuItem(_FB_XTEXT(Configmenu, 1548 focus_menu->insert(new TabFocusModelMenuItem(_FB_XTEXT(Configmenu,
1557 MouseTabFocus, "MouseTabFocus", "Hover over tab to focus windows"), 1549 MouseTabFocus, "MouseTabFocus", "Hover over tab to focus windows"),
1558 focusControl(), FocusControl::MOUSETABFOCUS, save_and_reconfigure)); 1550 focusControl(), FocusControl::MOUSETABFOCUS, reconf_cmd));
1559 focus_menu->insert(new FbTk::MenuSeparator()); 1551 focus_menu->insert(new FbTk::MenuSeparator());
1560 1552
1561 try { 1553 try {
1562 focus_menu->insert(new FbTk::BoolMenuItem(_FB_XTEXT(Configmenu, FocusNew, 1554 focus_menu->insert(new FbTk::BoolMenuItem(_FB_XTEXT(Configmenu, FocusNew,
1563 "Focus New Windows", "Focus newly created windows"), 1555 "Focus New Windows", "Focus newly created windows"),
1564 m_resource_manager.getResource<bool, FbTk::BoolTraits>(name() + ".focusNewWindows"), 1556 m_resource_manager.getResource<bool, FbTk::BoolTraits>(name() + ".focusNewWindows")));
1565 saverc_cmd));
1566 } catch (FbTk::ResourceException & e) { 1557 } catch (FbTk::ResourceException & e) {
1567 cerr<<e.what()<<endl; 1558 cerr<<e.what()<<endl;
1568 } 1559 }
@@ -1571,19 +1562,18 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
1571 try { 1562 try {
1572 focus_menu->insert(new FbTk::BoolMenuItem(_FB_XTEXT(Configmenu, FocusSameHead, 1563 focus_menu->insert(new FbTk::BoolMenuItem(_FB_XTEXT(Configmenu, FocusSameHead,
1573 "Keep Head", "Only revert focus on same head"), 1564 "Keep Head", "Only revert focus on same head"),
1574 m_resource_manager.getResource<bool, FbTk::BoolTraits>(name() + ".focusSameHead"), 1565 m_resource_manager.getResource<bool, FbTk::BoolTraits>(name() + ".focusSameHead")));
1575 saverc_cmd)); 1566 } catch (FbTk::ResourceException & e) {
1576 } catch (FbTk::ResourceException e) {
1577 cerr<<e.what()<<endl; 1567 cerr<<e.what()<<endl;
1578 } 1568 }
1579#endif // XINERAMA 1569#endif // XINERAMA
1580 1570
1581 _BOOLITEM(*focus_menu, Configmenu, AutoRaise, 1571 _BOOLITEM(*focus_menu, Configmenu, AutoRaise,
1582 "Auto Raise", "Auto Raise windows on sloppy", 1572 "Auto Raise", "Auto Raise windows on sloppy",
1583 resource.auto_raise, saverc_cmd); 1573 resource.auto_raise);
1584 _BOOLITEM(*focus_menu, Configmenu, ClickRaises, 1574 _BOOLITEM(*focus_menu, Configmenu, ClickRaises,
1585 "Click Raises", "Click Raises", 1575 "Click Raises", "Click Raises",
1586 resource.click_raises, saverc_cmd); 1576 resource.click_raises);
1587 1577
1588 focus_menu->updateMenu(); 1578 focus_menu->updateMenu();
1589 1579
@@ -1599,17 +1589,17 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
1599 1589
1600 _BOOLITEM(*maxmenu, Configmenu, FullMax, 1590 _BOOLITEM(*maxmenu, Configmenu, FullMax,
1601 "Full Maximization", "Maximise over slit, toolbar, etc", 1591 "Full Maximization", "Maximise over slit, toolbar, etc",
1602 resource.full_max, saverc_cmd); 1592 resource.full_max);
1603 _BOOLITEM(*maxmenu, Configmenu, MaxIgnoreInc, 1593 _BOOLITEM(*maxmenu, Configmenu, MaxIgnoreInc,
1604 "Ignore Resize Increment", 1594 "Ignore Resize Increment",
1605 "Maximizing Ignores Resize Increment (e.g. xterm)", 1595 "Maximizing Ignores Resize Increment (e.g. xterm)",
1606 resource.max_ignore_inc, saverc_cmd); 1596 resource.max_ignore_inc);
1607 _BOOLITEM(*maxmenu, Configmenu, MaxDisableMove, 1597 _BOOLITEM(*maxmenu, Configmenu, MaxDisableMove,
1608 "Disable Moving", "Don't Allow Moving While Maximized", 1598 "Disable Moving", "Don't Allow Moving While Maximized",
1609 resource.max_disable_move, saverc_cmd); 1599 resource.max_disable_move);
1610 _BOOLITEM(*maxmenu, Configmenu, MaxDisableResize, 1600 _BOOLITEM(*maxmenu, Configmenu, MaxDisableResize,
1611 "Disable Resizing", "Don't Allow Resizing While Maximized", 1601 "Disable Resizing", "Don't Allow Resizing While Maximized",
1612 resource.max_disable_resize, saverc_cmd); 1602 resource.max_disable_resize);
1613 1603
1614 maxmenu->updateMenu(); 1604 maxmenu->updateMenu();
1615 menu.insert(maxmenu_label, maxmenu); 1605 menu.insert(maxmenu_label, maxmenu);
@@ -1629,13 +1619,13 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
1629 1619
1630 _BOOLITEM(*tab_menu,Configmenu, TabsInTitlebar, 1620 _BOOLITEM(*tab_menu,Configmenu, TabsInTitlebar,
1631 "Tabs in Titlebar", "Tabs in Titlebar", 1621 "Tabs in Titlebar", "Tabs in Titlebar",
1632 resource.default_internal_tabs, saverc_cmd); 1622 resource.default_internal_tabs);
1633 tab_menu->insert(new FbTk::BoolMenuItem(_FB_XTEXT(Common, MaximizeOver, 1623 tab_menu->insert(new FbTk::BoolMenuItem(_FB_XTEXT(Common, MaximizeOver,
1634 "Maximize Over", "Maximize over this thing when maximizing"), 1624 "Maximize Over", "Maximize over this thing when maximizing"),
1635 resource.max_over_tabs, save_and_reconfigure)); 1625 resource.max_over_tabs, reconf_cmd));
1636 tab_menu->insert(new FbTk::BoolMenuItem(_FB_XTEXT(Toolbar, ShowIcons, 1626 tab_menu->insert(new FbTk::BoolMenuItem(_FB_XTEXT(Toolbar, ShowIcons,
1637 "Show Pictures", "chooses if little icons are shown next to title in the iconbar"), 1627 "Show Pictures", "chooses if little icons are shown next to title in the iconbar"),
1638 resource.tabs_use_pixmap, save_and_reconfigure)); 1628 resource.tabs_use_pixmap, reconf_cmd));
1639 1629
1640 FbTk::MenuItem *tab_width_item = 1630 FbTk::MenuItem *tab_width_item =
1641 new FbTk::IntMenuItem(_FB_XTEXT(Configmenu, ExternalTabWidth, 1631 new FbTk::IntMenuItem(_FB_XTEXT(Configmenu, ExternalTabWidth,
@@ -1643,7 +1633,6 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
1643 "Width of external-style tabs"), 1633 "Width of external-style tabs"),
1644 resource.tab_width, 10, 3000, /* silly number */ 1634 resource.tab_width, 10, 3000, /* silly number */
1645 *tab_menu); 1635 *tab_menu);
1646 tab_width_item->setCommand(saverc_cmd);
1647 tab_menu->insert(tab_width_item); 1636 tab_menu->insert(tab_width_item);
1648 1637
1649 // menu is 3 wide, 5 down 1638 // menu is 3 wide, 5 down
@@ -1678,7 +1667,7 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
1678 tabplacement_menu->insert(p.label); 1667 tabplacement_menu->insert(p.label);
1679 tabplacement_menu->setItemEnabled(i, false); 1668 tabplacement_menu->setItemEnabled(i, false);
1680 } else 1669 } else
1681 tabplacement_menu->insert(new TabPlacementMenuItem(p.label, *this, p.placement, saverc_cmd)); 1670 tabplacement_menu->insert(new TabPlacementMenuItem(p.label, *this, p.placement));
1682 } 1671 }
1683 tabplacement_menu->updateMenu(); 1672 tabplacement_menu->updateMenu();
1684 1673
@@ -1697,13 +1686,13 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
1697 alpha_menu->insert(new FbTk::BoolMenuItem(_FB_XTEXT(Configmenu, ForcePseudoTrans, 1686 alpha_menu->insert(new FbTk::BoolMenuItem(_FB_XTEXT(Configmenu, ForcePseudoTrans,
1698 "Force Pseudo-Transparency", 1687 "Force Pseudo-Transparency",
1699 "When composite is available, still use old pseudo-transparency"), 1688 "When composite is available, still use old pseudo-transparency"),
1700 Fluxbox::instance()->getPseudoTransResource(), save_and_reconfigure)); 1689 Fluxbox::instance()->getPseudoTransResource(), reconf_cmd));
1701 } 1690 }
1702 1691
1703 // in order to save system resources, don't save or reconfigure alpha 1692 // in order to save system resources, don't save or reconfigure alpha
1704 // settings until after the user is done changing them 1693 // settings until after the user is done changing them
1705 FbTk::RefCount<FbTk::Command<void> > delayed_save_and_reconf( 1694 FbTk::RefCount<FbTk::Command<void> > delayed_save_and_reconf(
1706 new FbTk::DelayedCmd(save_and_reconfigure)); 1695 new FbTk::DelayedCmd(reconf_cmd));
1707 1696
1708 FbTk::MenuItem *focused_alpha_item = 1697 FbTk::MenuItem *focused_alpha_item =
1709 new FbTk::IntMenuItem(_FB_XTEXT(Configmenu, FocusedAlpha, 1698 new FbTk::IntMenuItem(_FB_XTEXT(Configmenu, FocusedAlpha,
@@ -1743,11 +1732,11 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
1743 _BOOLITEM(menu, Configmenu, OpaqueMove, 1732 _BOOLITEM(menu, Configmenu, OpaqueMove,
1744 "Opaque Window Moving", 1733 "Opaque Window Moving",
1745 "Window Moving with whole window visible (as opposed to outline moving)", 1734 "Window Moving with whole window visible (as opposed to outline moving)",
1746 resource.opaque_move, saverc_cmd); 1735 resource.opaque_move);
1747 _BOOLITEM(menu, Configmenu, WorkspaceWarping, 1736 _BOOLITEM(menu, Configmenu, WorkspaceWarping,
1748 "Workspace Warping", 1737 "Workspace Warping",
1749 "Workspace Warping - dragging windows to the edge and onto the next workspace", 1738 "Workspace Warping - dragging windows to the edge and onto the next workspace",
1750 resource.workspace_warping, saverc_cmd); 1739 resource.workspace_warping);
1751 1740
1752#undef _BOOLITEM 1741#undef _BOOLITEM
1753 1742
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index 0c8c3af..0cfcd41 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.cc
@@ -239,7 +239,7 @@ Fluxbox::Fluxbox(int argc, char **argv,
239 : FbTk::App(dpy_name.c_str()), 239 : FbTk::App(dpy_name.c_str()),
240 m_l(new Lua), 240 m_l(new Lua),
241 m_fbatoms(FbAtoms::instance()), 241 m_fbatoms(FbAtoms::instance()),
242 m_resourcemanager("session", *m_l), 242 m_resourcemanager("session", *m_l, 5),
243 243
244 m_RC_PATH(rc_path), 244 m_RC_PATH(rc_path),
245 m_rc_ignoreborder(m_resourcemanager, false, "ignoreBorder"), 245 m_rc_ignoreborder(m_resourcemanager, false, "ignoreBorder"),