aboutsummaryrefslogtreecommitdiff
path: root/src/fluxbox.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/fluxbox.cc')
-rw-r--r--src/fluxbox.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index 77b9881..129ac80 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.cc
@@ -306,7 +306,7 @@ Fluxbox::Fluxbox(int argc, char **argv,
306 // because it could affect ongoing menu stuff so we need to reconfig in 306 // because it could affect ongoing menu stuff so we need to reconfig in
307 // the next event "round". 307 // the next event "round".
308 FbTk::RefCount<FbTk::Command<void> > reconfig_cmd(new FbTk::SimpleCommand<Fluxbox>(*this, &Fluxbox::timed_reconfigure)); 308 FbTk::RefCount<FbTk::Command<void> > reconfig_cmd(new FbTk::SimpleCommand<Fluxbox>(*this, &Fluxbox::timed_reconfigure));
309 m_reconfig_timer.setTimeout(0, 1); 309 m_reconfig_timer.setTimeout(1);
310 m_reconfig_timer.setCommand(reconfig_cmd); 310 m_reconfig_timer.setCommand(reconfig_cmd);
311 m_reconfig_timer.fireOnce(true); 311 m_reconfig_timer.fireOnce(true);
312 312
@@ -363,7 +363,6 @@ Fluxbox::Fluxbox(int argc, char **argv,
363 screens.push_back(i); 363 screens.push_back(i);
364 364
365 // find out, on what "screens" fluxbox should run 365 // find out, on what "screens" fluxbox should run
366 // FIXME(php-coder): maybe it worths moving this code to main.cc, where command line is parsed?
367 for (i = 1; i < m_argc; i++) { 366 for (i = 1; i < m_argc; i++) {
368 if (! strcmp(m_argv[i], "-screen")) { 367 if (! strcmp(m_argv[i], "-screen")) {
369 if ((++i) >= m_argc) { 368 if ((++i) >= m_argc) {
@@ -507,8 +506,11 @@ void Fluxbox::initScreen(BScreen *screen) {
507 506
508 507
509void Fluxbox::eventLoop() { 508void Fluxbox::eventLoop() {
509
510 Display *disp = display(); 510 Display *disp = display();
511
511 while (!m_shutdown) { 512 while (!m_shutdown) {
513
512 if (XPending(disp)) { 514 if (XPending(disp)) {
513 XEvent e; 515 XEvent e;
514 XNextEvent(disp, &e); 516 XNextEvent(disp, &e);
@@ -524,8 +526,9 @@ void Fluxbox::eventLoop() {
524 handleEvent(&e); 526 handleEvent(&e);
525 } 527 }
526 } else { 528 } else {
527 FbTk::Timer::updateTimers(ConnectionNumber(disp)); //handle all timers 529 FbTk::Timer::updateTimers(ConnectionNumber(disp));
528 } 530 }
531
529 } 532 }
530} 533}
531 534
@@ -553,9 +556,11 @@ void Fluxbox::ungrab() {
553} 556}
554 557
555void Fluxbox::handleEvent(XEvent * const e) { 558void Fluxbox::handleEvent(XEvent * const e) {
559
556 _FB_USES_NLS; 560 _FB_USES_NLS;
557 m_last_event = *e; 561 m_last_event = *e;
558 562
563
559 // it is possible (e.g. during moving) for a window 564 // it is possible (e.g. during moving) for a window
560 // to mask all events to go to it 565 // to mask all events to go to it
561 if ((m_masked == e->xany.window) && m_masked_window) { 566 if ((m_masked == e->xany.window) && m_masked_window) {