From 48f761f9816f0f11e05dcc4e8f5ac506328e1683 Mon Sep 17 00:00:00 2001 From: markt Date: Sun, 1 Apr 2007 21:42:01 +0000 Subject: fixed problem with creating windows in iconic state --- ChangeLog | 3 +++ src/ClientPattern.cc | 2 +- src/FbTk/Resource.cc | 4 +++- src/Screen.cc | 10 ++-------- src/Window.cc | 28 ++++++---------------------- src/fluxbox.cc | 10 ++++------ 6 files changed, 19 insertions(+), 38 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1400ad2..9733ca4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ (Format: Year/Month/Day) Changes for 1.0.0: +*07/04/01: + * Fixed a problem with windows being created in iconic state (Mark) + Window.cc Screen.cc fluxbox.cc *07/03/31: * Fix window menu context when opened by clicking on tab (Simon) sf.net bug #1652185 diff --git a/src/ClientPattern.cc b/src/ClientPattern.cc index 339092d..d644767 100644 --- a/src/ClientPattern.cc +++ b/src/ClientPattern.cc @@ -173,7 +173,7 @@ string ClientPattern::toString() const { switch ((*it)->prop) { case NAME: - // do nothing -> this is the default + pat.append("name="); break; case CLASS: pat.append("class="); diff --git a/src/FbTk/Resource.cc b/src/FbTk/Resource.cc index 5d2dc3b..cb45eac 100644 --- a/src/FbTk/Resource.cc +++ b/src/FbTk/Resource.cc @@ -24,6 +24,7 @@ #include "XrmDatabaseHelper.hh" #include "Resource.hh" #include "I18n.hh" +#include "StringUtil.hh" #include #ifdef HAVE_CASSERT @@ -61,7 +62,7 @@ bool ResourceManager::m_init = false; @return true on success else false */ bool ResourceManager::load(const char *filename) { - m_filename = filename; + m_filename = StringUtil::expandFilename(filename).c_str(); // force reload (lock will ensure it exists) if (m_database) { @@ -106,6 +107,7 @@ bool ResourceManager::load(const char *filename) { */ bool ResourceManager::save(const char *filename, const char *mergefilename) { assert(filename); + filename = StringUtil::expandFilename(filename).c_str(); // empty database XrmDatabaseHelper database; diff --git a/src/Screen.cc b/src/Screen.cc index 7af00a7..9612a04 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -697,15 +697,9 @@ void BScreen::initWindows() { continue; } - if (attrib.map_state != IsUnmapped) { - FluxboxWindow *win = createWindow(children[i]); + if (attrib.map_state != IsUnmapped) + createWindow(children[i]); - if (win) { - XMapRequestEvent mre; - mre.window = children[i]; - win->mapRequestEvent(mre); - } - } } children[i] = None; // we dont need this anymore, since we already created a window for it } diff --git a/src/Window.cc b/src/Window.cc index ebc5923..6c7cf11 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -533,7 +533,8 @@ void FluxboxWindow::init() { if (iconic) { iconic = false; iconify(); - } + } else + deiconify(false); sendConfigureNotify(); // no focus default @@ -2336,28 +2337,11 @@ void FluxboxWindow::mapRequestEvent(XMapRequestEvent &re) { return; } - // rest of current state checking is in initialisation - if (m_current_state == WithdrawnState) - withdraw(true); - else { - - // if this window was destroyed while autogrouping - bool destroyed = false; - - // check WM_CLASS only when we changed state to NormalState from - // WithdrawnState (ICCC 4.1.2.5) - client->updateWMClassHint(); + // Note: this function never gets called from WithdrawnState + // initial state is handled in restoreAttributes() and init() + setCurrentClient(*client, false); // focus handled on MapNotify + deiconify(false); - Workspace *wsp = screen().getWorkspace(m_workspace_number); - if (wsp != 0 && isGroupable()) - destroyed = wsp->checkGrouping(*this); - - // if we weren't grouped with another window we deiconify ourself - // make sure iconified windows stay that way on fluxbox start - if (!destroyed && !(iconic && Fluxbox::instance()->isStartup())) - deiconify(false); - - } } diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 2393837..5dc2b52 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc @@ -781,7 +781,6 @@ void Fluxbox::handleEvent(XEvent * const e) { #endif // DEBUG WinClient *winclient = searchWindow(e->xmaprequest.window); - FluxboxWindow *win = 0; if (! winclient) { BScreen *screen = 0; @@ -807,15 +806,14 @@ void Fluxbox::handleEvent(XEvent * const e) { if (screen == 0) { cerr<<"Fluxbox "<<_FB_CONSOLETEXT(Fluxbox, CantMapWindow, "Warning! Could not find screen to map window on!", "")<createWindow(e->xmaprequest.window); + screen->createWindow(e->xmaprequest.window); } else { - win = winclient->fbwindow(); + // we don't handle MapRequest in FluxboxWindow::handleEvent + if (winclient->fbwindow()) + winclient->fbwindow()->mapRequestEvent(e->xmaprequest); } - // we don't handle MapRequest in FluxboxWindow::handleEvent - if (win) - win->mapRequestEvent(e->xmaprequest); } break; case MapNotify: -- cgit v0.11.2