fixed problem with creating windows in iconic state
This commit is contained in:
parent
c883e477c5
commit
48f761f981
6 changed files with 19 additions and 38 deletions
|
@ -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
|
||||
|
|
|
@ -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=");
|
||||
|
|
|
@ -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 @@ 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;
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
// 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);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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!", "")<<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:
|
||||
|
|
Loading…
Reference in a new issue