aboutsummaryrefslogtreecommitdiff
path: root/src/fluxbox.cc
diff options
context:
space:
mode:
authorrathnor <rathnor>2004-09-11 12:33:14 (GMT)
committerrathnor <rathnor>2004-09-11 12:33:14 (GMT)
commit7d793fc6a8d7aa07a7636df2e96054c4a8e2c6a8 (patch)
treead753983b54d61f8a01fb32794d67bf50585789e /src/fluxbox.cc
parentc8f9cf1177b6de1cc210f0706dae302b9aa4f7b5 (diff)
downloadfluxbox_pavel-7d793fc6a8d7aa07a7636df2e96054c4a8e2c6a8.zip
fluxbox_pavel-7d793fc6a8d7aa07a7636df2e96054c4a8e2c6a8.tar.bz2
fix issues that resulted in unnecessary X errors
Diffstat (limited to 'src/fluxbox.cc')
-rw-r--r--src/fluxbox.cc28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index f242f8c..324fb05 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.252 2004/09/08 16:50:42 akir Exp $ 25// $Id: fluxbox.cc,v 1.253 2004/09/11 12:33:14 rathnor Exp $
26 26
27#include "fluxbox.hh" 27#include "fluxbox.hh"
28 28
@@ -386,18 +386,20 @@ void copyFile(const std::string &from, const std::string &to) {
386} // end anonymous 386} // end anonymous
387 387
388static int handleXErrors(Display *d, XErrorEvent *e) { 388static int handleXErrors(Display *d, XErrorEvent *e) {
389 if (e->error_code == BadWindow)
390 last_bad_window = e->resourceid;
389#ifdef DEBUG 391#ifdef DEBUG
390 /* 392 else {
391 char errtxt[128]; 393 // ignore bad window ones, they happen a lot
392 394 // when windows close themselves
393 XGetErrorText(d, e->error_code, errtxt, 128); 395 char errtxt[128];
394 cerr<<"Fluxbox: X Error: "<<errtxt<<"("<<(int)e->error_code<<") opcodes "<< 396
395 (int)e->request_code<<"/"<<(int)e->minor_code<<" resource 0x"<<hex<<(int)e->resourceid<<dec<<endl; 397 XGetErrorText(d, e->error_code, errtxt, 128);
396 */ 398 cerr<<"Fluxbox: X Error: "<<errtxt<<"("<<(int)e->error_code<<") opcodes "<<
399 (int)e->request_code<<"/"<<(int)e->minor_code<<" resource 0x"<<hex<<(int)e->resourceid<<dec<<endl;
400 }
397#endif // !DEBUG 401#endif // !DEBUG
398 402
399 if (e->error_code == BadWindow)
400 last_bad_window = e->resourceid;
401 403
402 return False; 404 return False;
403} 405}
@@ -501,6 +503,7 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
501 m_reconfig_timer.setTimeout(to); 503 m_reconfig_timer.setTimeout(to);
502 m_reconfig_timer.setCommand(reconfig_cmd); 504 m_reconfig_timer.setCommand(reconfig_cmd);
503 m_reconfig_timer.fireOnce(true); 505 m_reconfig_timer.fireOnce(true);
506 //XSynchronize(disp, True);
504 507
505 s_singleton = this; 508 s_singleton = this;
506 m_have_shape = false; 509 m_have_shape = false;
@@ -633,10 +636,11 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
633 FbTk::ThemeManager::instance().load(FbTk::StringUtil::expandFilename(getStyleFilename())); 636 FbTk::ThemeManager::instance().load(FbTk::StringUtil::expandFilename(getStyleFilename()));
634 637
635 XSynchronize(disp, False); 638 XSynchronize(disp, False);
639 //XSynchronize(disp, True);
636 sync(false); 640 sync(false);
637 641
638 m_reconfigure_wait = m_reread_menu_wait = false; 642 m_reconfigure_wait = m_reread_menu_wait = false;
639 643
640 // Create keybindings handler and load keys file 644 // Create keybindings handler and load keys file
641 m_key.reset(new Keys(StringUtil::expandFilename(*m_rc_keyfile).c_str())); 645 m_key.reset(new Keys(StringUtil::expandFilename(*m_rc_keyfile).c_str()));
642 646
@@ -1813,7 +1817,7 @@ void Fluxbox::load_rc(BScreen &screen) {
1813 for (unsigned int i=0; i<paths.size(); ++i) 1817 for (unsigned int i=0; i<paths.size(); ++i)
1814 FbTk::Image::addSearchPath(paths[i]); 1818 FbTk::Image::addSearchPath(paths[i]);
1815 } 1819 }
1816 1820
1817 if (!dbfile.empty()) { 1821 if (!dbfile.empty()) {
1818 if (!m_screen_rm.load(dbfile.c_str())) { 1822 if (!m_screen_rm.load(dbfile.c_str())) {
1819 cerr<<_FBTEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "Failed trying to read rc file")<<":"<<dbfile<<endl; 1823 cerr<<_FBTEXT(Fluxbox, CantLoadRCFile, "Failed to load database", "Failed trying to read rc file")<<":"<<dbfile<<endl;