fixed window creation

This commit is contained in:
fluxgen 2002-02-11 11:33:14 +00:00
parent 790cf3d5b4
commit c222ff6f0a

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE. // DEALINGS IN THE SOFTWARE.
// $Id: fluxbox.cc,v 1.30 2002/02/10 11:18:17 fluxgen Exp $ // $Id: fluxbox.cc,v 1.31 2002/02/11 11:33:14 fluxgen Exp $
//Use some GNU extensions //Use some GNU extensions
#ifndef _GNU_SOURCE #ifndef _GNU_SOURCE
@ -551,10 +551,8 @@ void Fluxbox::process_event(XEvent *e) {
FluxboxWindow *win = searchWindow(e->xmaprequest.window); FluxboxWindow *win = searchWindow(e->xmaprequest.window);
if (! win) { if (! win) {
try { win = new FluxboxWindow(e->xmaprequest.window);
win = new FluxboxWindow(e->xmaprequest.window); if (!win->isManaged()) {
} catch (FluxboxWindow::Error error) {
FluxboxWindow::showError(error);
delete win; delete win;
win = 0; win = 0;
} }
@ -568,7 +566,6 @@ void Fluxbox::process_event(XEvent *e) {
case MapNotify: case MapNotify:
{ {
FluxboxWindow *win = searchWindow(e->xmap.window); FluxboxWindow *win = searchWindow(e->xmap.window);
XMapWindow(getXDisplay(), e->xmap.window);
if (win!=0) if (win!=0)
win->mapNotifyEvent(&e->xmap); win->mapNotifyEvent(&e->xmap);
@ -591,10 +588,10 @@ void Fluxbox::process_event(XEvent *e) {
if ((win = searchWindow(e->xunmap.window))!=0 ) { if ((win = searchWindow(e->xunmap.window))!=0 ) {
// only process windows with StructureNotify selected // only process windows with StructureNotify selected
// (ignore SubstructureNotify) // (ignore SubstructureNotify)
if (win->getClientWindow() != e->xunmap.window || // if (win->getClientWindow() != e->xunmap.window ||
win->isTransient()) { // win->isTransient()) {
win->unmapNotifyEvent(&e->xunmap); win->unmapNotifyEvent(&e->xunmap);
} // }
#ifdef SLIT #ifdef SLIT
} else if ((slit = searchSlit(e->xunmap.window))!=0) { } else if ((slit = searchSlit(e->xunmap.window))!=0) {
slit->removeClient(e->xunmap.window); slit->removeClient(e->xunmap.window);
@ -1718,9 +1715,6 @@ void Fluxbox::shutdown(void) {
//saves resources //saves resources
//---------------------- //----------------------
void Fluxbox::save_rc(void) { void Fluxbox::save_rc(void) {
#ifdef DEBUG
cerr<<__FILE__<<"("<<__LINE__<<"): Saving resources --------------"<<endl;
#endif
XrmDatabase new_blackboxrc = 0; XrmDatabase new_blackboxrc = 0;
@ -1906,9 +1900,6 @@ void Fluxbox::load_rc(void) {
//get resource filename //get resource filename
auto_ptr<char> dbfile(getRcFilename()); auto_ptr<char> dbfile(getRcFilename());
#ifdef DEBUG
cerr<<__FILE__<<"("<<__LINE__<<"): dbfile="<<dbfile.get()<<endl;
#endif
if (dbfile.get()) { if (dbfile.get()) {
if (!m_resourcemanager.load(dbfile.get())) { if (!m_resourcemanager.load(dbfile.get())) {
cerr<<"Faild to load database:"<<dbfile.get()<<endl; cerr<<"Faild to load database:"<<dbfile.get()<<endl;