aboutsummaryrefslogtreecommitdiff
path: root/src/fluxbox.cc
diff options
context:
space:
mode:
authorrathnor <rathnor>2003-07-18 15:40:55 (GMT)
committerrathnor <rathnor>2003-07-18 15:40:55 (GMT)
commit7e1733c4352befe577150bad63d362dd7c1a94b9 (patch)
tree1f339ae234f85aaa98529e9c511117dcb620a9f1 /src/fluxbox.cc
parent06d723aefe7fb794f50b1e7a0ad8ad4473ae8ac6 (diff)
downloadfluxbox-7e1733c4352befe577150bad63d362dd7c1a94b9.zip
fluxbox-7e1733c4352befe577150bad63d362dd7c1a94b9.tar.bz2
reorganise operation of ResourceManager
plus fix initialisation of layer for slit and toolbar
Diffstat (limited to 'src/fluxbox.cc')
-rw-r--r--src/fluxbox.cc17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index eaa62f9..027da76 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.170 2003/07/10 12:00:49 fluxgen Exp $ 25// $Id: fluxbox.cc,v 1.171 2003/07/18 15:40:55 rathnor Exp $
26 26
27#include "fluxbox.hh" 27#include "fluxbox.hh"
28 28
@@ -388,7 +388,9 @@ Fluxbox::Titlebar Fluxbox::s_titlebar_right[] = {MINIMIZE, MAXIMIZE, CLOSE};
388Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfilename) 388Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfilename)
389 : FbTk::App(dpy_name), 389 : FbTk::App(dpy_name),
390 m_fbatoms(new FbAtoms()), 390 m_fbatoms(new FbAtoms()),
391 m_resourcemanager(), m_screen_rm(), 391 m_resourcemanager(rcfilename, true),
392 // TODO: shouldn't need a separate one for screen
393 m_screen_rm(m_resourcemanager),
392 m_rc_tabs(m_resourcemanager, true, "session.tabs", "Session.Tabs"), 394 m_rc_tabs(m_resourcemanager, true, "session.tabs", "Session.Tabs"),
393 m_rc_ignoreborder(m_resourcemanager, false, "session.ignoreBorder", "Session.IgnoreBorder"), 395 m_rc_ignoreborder(m_resourcemanager, false, "session.ignoreBorder", "Session.IgnoreBorder"),
394 m_rc_colors_per_channel(m_resourcemanager, 4, 396 m_rc_colors_per_channel(m_resourcemanager, 4,
@@ -463,6 +465,8 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
463 XRRQueryExtension(disp, &m_randr_event_type, &error_base); 465 XRRQueryExtension(disp, &m_randr_event_type, &error_base);
464#endif // HAVE_RANDR 466#endif // HAVE_RANDR
465 467
468 load_rc();
469
466 // setup atom handlers before we create any windows 470 // setup atom handlers before we create any windows
467#ifdef USE_GNOME 471#ifdef USE_GNOME
468 addAtomHandler(new Gnome()); // for gnome 1 atom support 472 addAtomHandler(new Gnome()); // for gnome 1 atom support
@@ -493,13 +497,12 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
493 m_fluxbox_pid = XInternAtom(disp, "_BLACKBOX_PID", False); 497 m_fluxbox_pid = XInternAtom(disp, "_BLACKBOX_PID", False);
494#endif // HAVE_GETPID 498#endif // HAVE_GETPID
495 499
496 load_rc();
497 // Allocate screens 500 // Allocate screens
498 for (int i = 0; i < ScreenCount(display()); i++) { 501 for (int i = 0; i < ScreenCount(display()); i++) {
499 char scrname[128], altscrname[128]; 502 char scrname[128], altscrname[128];
500 sprintf(scrname, "session.screen%d", i); 503 sprintf(scrname, "session.screen%d", i);
501 sprintf(altscrname, "session.Screen%d", i); 504 sprintf(altscrname, "session.Screen%d", i);
502 BScreen *screen = new BScreen(m_screen_rm, 505 BScreen *screen = new BScreen(m_screen_rm.lock(),
503 scrname, altscrname, 506 scrname, altscrname,
504 i, getNumberOfLayers()); 507 i, getNumberOfLayers());
505 if (! screen->isScreenManaged()) { 508 if (! screen->isScreenManaged()) {
@@ -563,7 +566,13 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
563 // Create keybindings handler and load keys file 566 // Create keybindings handler and load keys file
564 m_key.reset(new Keys(StringUtil::expandFilename(*m_rc_keyfile).c_str())); 567 m_key.reset(new Keys(StringUtil::expandFilename(*m_rc_keyfile).c_str()));
565 568
569 m_resourcemanager.unlock();
566 ungrab(); 570 ungrab();
571
572#ifdef DEBUG
573 if (m_resourcemanager.lockDepth() != 0)
574 cerr<<"--- resource manager lockdepth = "<<m_resourcemanager.lockDepth()<<endl;
575#endif //DEBUG
567 m_starting = false; 576 m_starting = false;
568} 577}
569 578