fixed problem with creating windows in iconic state
markt markt
6 files changed,
19 insertions(+),
38 deletions(-)
M
src/ClientPattern.cc
→
src/ClientPattern.cc
@@ -173,7 +173,7 @@ pat.append(" (");
switch ((*it)->prop) { case NAME: - // do nothing -> this is the default + pat.append("name="); break; case CLASS: pat.append("class=");
M
src/FbTk/Resource.cc
→
src/FbTk/Resource.cc
@@ -24,6 +24,7 @@
#include "XrmDatabaseHelper.hh" #include "Resource.hh" #include "I18n.hh" +#include "StringUtil.hh" #include <iostream> #ifdef HAVE_CASSERT@@ -61,7 +62,7 @@ reloads all resources from resourcefile
@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 @@ @return 0 on success else negative value representing the error
*/ bool ResourceManager::save(const char *filename, const char *mergefilename) { assert(filename); + filename = StringUtil::expandFilename(filename).c_str(); // empty database XrmDatabaseHelper database;
M
src/Screen.cc
→
src/Screen.cc
@@ -697,15 +697,9 @@ children[i] = None; // we dont need this anymore, since we already created a window for it
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 }
M
src/Window.cc
→
src/Window.cc
@@ -533,7 +533,8 @@
if (iconic) { iconic = false; iconify(); - } + } else + deiconify(false); sendConfigureNotify(); // no focus default@@ -2336,28 +2337,11 @@ #endif // DEBUG
return; } - // rest of current state checking is in initialisation - if (m_current_state == WithdrawnState) - withdraw(true); - else { + // 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); - // 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(); - - 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); - - } }
M
src/fluxbox.cc
→
src/fluxbox.cc
@@ -781,7 +781,6 @@
#endif // DEBUG WinClient *winclient = searchWindow(e->xmaprequest.window); - FluxboxWindow *win = 0; if (! winclient) { BScreen *screen = 0;@@ -807,15 +806,14 @@
if (screen == 0) { cerr<<"Fluxbox "<<_FB_CONSOLETEXT(Fluxbox, CantMapWindow, "Warning! Could not find screen to map window on!", "")<<endl; } else - win = screen->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: