diff options
author | fluxgen <fluxgen> | 2002-02-11 11:33:14 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2002-02-11 11:33:14 (GMT) |
commit | c222ff6f0ab9bb1b7ddefded3be41d7350624626 (patch) | |
tree | 9e3b32ef743119c50a269a61fdd35e5b95b7f499 /src | |
parent | 790cf3d5b4ced20cdb1b2d55ecf3700060d77240 (diff) | |
download | fluxbox-c222ff6f0ab9bb1b7ddefded3be41d7350624626.zip fluxbox-c222ff6f0ab9bb1b7ddefded3be41d7350624626.tar.bz2 |
fixed window creation
Diffstat (limited to 'src')
-rw-r--r-- | src/fluxbox.cc | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 821bc78..7a6cfc0 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.30 2002/02/10 11:18:17 fluxgen Exp $ | 25 | // $Id: fluxbox.cc,v 1.31 2002/02/11 11:33:14 fluxgen Exp $ |
26 | 26 | ||
27 | //Use some GNU extensions | 27 | //Use some GNU extensions |
28 | #ifndef _GNU_SOURCE | 28 | #ifndef _GNU_SOURCE |
@@ -551,15 +551,13 @@ void Fluxbox::process_event(XEvent *e) { | |||
551 | FluxboxWindow *win = searchWindow(e->xmaprequest.window); | 551 | FluxboxWindow *win = searchWindow(e->xmaprequest.window); |
552 | 552 | ||
553 | if (! win) { | 553 | if (! win) { |
554 | try { | 554 | win = new FluxboxWindow(e->xmaprequest.window); |
555 | win = new FluxboxWindow(e->xmaprequest.window); | 555 | if (!win->isManaged()) { |
556 | } catch (FluxboxWindow::Error error) { | ||
557 | FluxboxWindow::showError(error); | ||
558 | delete win; | 556 | delete win; |
559 | win = 0; | 557 | win = 0; |
560 | } | 558 | } |
561 | } | 559 | } |
562 | 560 | ||
563 | if ((win = searchWindow(e->xmaprequest.window))) | 561 | if ((win = searchWindow(e->xmaprequest.window))) |
564 | win->mapRequestEvent(&e->xmaprequest); | 562 | win->mapRequestEvent(&e->xmaprequest); |
565 | 563 | ||
@@ -568,7 +566,6 @@ void Fluxbox::process_event(XEvent *e) { | |||
568 | case MapNotify: | 566 | case MapNotify: |
569 | { | 567 | { |
570 | FluxboxWindow *win = searchWindow(e->xmap.window); | 568 | FluxboxWindow *win = searchWindow(e->xmap.window); |
571 | XMapWindow(getXDisplay(), e->xmap.window); | ||
572 | if (win!=0) | 569 | if (win!=0) |
573 | win->mapNotifyEvent(&e->xmap); | 570 | win->mapNotifyEvent(&e->xmap); |
574 | 571 | ||
@@ -591,10 +588,10 @@ void Fluxbox::process_event(XEvent *e) { | |||
591 | if ((win = searchWindow(e->xunmap.window))!=0 ) { | 588 | if ((win = searchWindow(e->xunmap.window))!=0 ) { |
592 | // only process windows with StructureNotify selected | 589 | // only process windows with StructureNotify selected |
593 | // (ignore SubstructureNotify) | 590 | // (ignore SubstructureNotify) |
594 | if (win->getClientWindow() != e->xunmap.window || | 591 | // if (win->getClientWindow() != e->xunmap.window || |
595 | win->isTransient()) { | 592 | // win->isTransient()) { |
596 | win->unmapNotifyEvent(&e->xunmap); | 593 | win->unmapNotifyEvent(&e->xunmap); |
597 | } | 594 | // } |
598 | #ifdef SLIT | 595 | #ifdef SLIT |
599 | } else if ((slit = searchSlit(e->xunmap.window))!=0) { | 596 | } else if ((slit = searchSlit(e->xunmap.window))!=0) { |
600 | slit->removeClient(e->xunmap.window); | 597 | slit->removeClient(e->xunmap.window); |
@@ -1718,10 +1715,7 @@ void Fluxbox::shutdown(void) { | |||
1718 | //saves resources | 1715 | //saves resources |
1719 | //---------------------- | 1716 | //---------------------- |
1720 | void Fluxbox::save_rc(void) { | 1717 | void Fluxbox::save_rc(void) { |
1721 | #ifdef DEBUG | 1718 | |
1722 | cerr<<__FILE__<<"("<<__LINE__<<"): Saving resources --------------"<<endl; | ||
1723 | #endif | ||
1724 | |||
1725 | XrmDatabase new_blackboxrc = 0; | 1719 | XrmDatabase new_blackboxrc = 0; |
1726 | 1720 | ||
1727 | char rc_string[1024]; | 1721 | char rc_string[1024]; |
@@ -1906,9 +1900,6 @@ void Fluxbox::load_rc(void) { | |||
1906 | 1900 | ||
1907 | //get resource filename | 1901 | //get resource filename |
1908 | auto_ptr<char> dbfile(getRcFilename()); | 1902 | auto_ptr<char> dbfile(getRcFilename()); |
1909 | #ifdef DEBUG | ||
1910 | cerr<<__FILE__<<"("<<__LINE__<<"): dbfile="<<dbfile.get()<<endl; | ||
1911 | #endif | ||
1912 | if (dbfile.get()) { | 1903 | if (dbfile.get()) { |
1913 | if (!m_resourcemanager.load(dbfile.get())) { | 1904 | if (!m_resourcemanager.load(dbfile.get())) { |
1914 | cerr<<"Faild to load database:"<<dbfile.get()<<endl; | 1905 | cerr<<"Faild to load database:"<<dbfile.get()<<endl; |