summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormarkt <markt>2007-04-01 21:42:01 (GMT)
committermarkt <markt>2007-04-01 21:42:01 (GMT)
commit48f761f9816f0f11e05dcc4e8f5ac506328e1683 (patch)
treecd93a828fb6db8eb1eb69db00be7ad37b97bf96a /src
parentc883e477c547b14aae029b5376c1145a8439fcea (diff)
downloadfluxbox_lack-48f761f9816f0f11e05dcc4e8f5ac506328e1683.zip
fluxbox_lack-48f761f9816f0f11e05dcc4e8f5ac506328e1683.tar.bz2
fixed problem with creating windows in iconic state
Diffstat (limited to 'src')
-rw-r--r--src/ClientPattern.cc2
-rw-r--r--src/FbTk/Resource.cc4
-rw-r--r--src/Screen.cc10
-rw-r--r--src/Window.cc28
-rw-r--r--src/fluxbox.cc10
5 files changed, 16 insertions, 38 deletions
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 {
173 173
174 switch ((*it)->prop) { 174 switch ((*it)->prop) {
175 case NAME: 175 case NAME:
176 // do nothing -> this is the default 176 pat.append("name=");
177 break; 177 break;
178 case CLASS: 178 case CLASS:
179 pat.append("class="); 179 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 @@
24#include "XrmDatabaseHelper.hh" 24#include "XrmDatabaseHelper.hh"
25#include "Resource.hh" 25#include "Resource.hh"
26#include "I18n.hh" 26#include "I18n.hh"
27#include "StringUtil.hh"
27 28
28#include <iostream> 29#include <iostream>
29#ifdef HAVE_CASSERT 30#ifdef HAVE_CASSERT
@@ -61,7 +62,7 @@ bool ResourceManager::m_init = false;
61 @return true on success else false 62 @return true on success else false
62*/ 63*/
63bool ResourceManager::load(const char *filename) { 64bool ResourceManager::load(const char *filename) {
64 m_filename = filename; 65 m_filename = StringUtil::expandFilename(filename).c_str();
65 66
66 // force reload (lock will ensure it exists) 67 // force reload (lock will ensure it exists)
67 if (m_database) { 68 if (m_database) {
@@ -106,6 +107,7 @@ bool ResourceManager::load(const char *filename) {
106*/ 107*/
107bool ResourceManager::save(const char *filename, const char *mergefilename) { 108bool ResourceManager::save(const char *filename, const char *mergefilename) {
108 assert(filename); 109 assert(filename);
110 filename = StringUtil::expandFilename(filename).c_str();
109 111
110 // empty database 112 // empty database
111 XrmDatabaseHelper database; 113 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() {
697 continue; 697 continue;
698 } 698 }
699 699
700 if (attrib.map_state != IsUnmapped) { 700 if (attrib.map_state != IsUnmapped)
701 FluxboxWindow *win = createWindow(children[i]); 701 createWindow(children[i]);
702 702
703 if (win) {
704 XMapRequestEvent mre;
705 mre.window = children[i];
706 win->mapRequestEvent(mre);
707 }
708 }
709 } 703 }
710 children[i] = None; // we dont need this anymore, since we already created a window for it 704 children[i] = None; // we dont need this anymore, since we already created a window for it
711 } 705 }
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() {
533 if (iconic) { 533 if (iconic) {
534 iconic = false; 534 iconic = false;
535 iconify(); 535 iconify();
536 } 536 } else
537 deiconify(false);
537 538
538 sendConfigureNotify(); 539 sendConfigureNotify();
539 // no focus default 540 // no focus default
@@ -2336,28 +2337,11 @@ void FluxboxWindow::mapRequestEvent(XMapRequestEvent &re) {
2336 return; 2337 return;
2337 } 2338 }
2338 2339
2339 // rest of current state checking is in initialisation 2340 // Note: this function never gets called from WithdrawnState
2340 if (m_current_state == WithdrawnState) 2341 // initial state is handled in restoreAttributes() and init()
2341 withdraw(true); 2342 setCurrentClient(*client, false); // focus handled on MapNotify
2342 else { 2343 deiconify(false);
2343
2344 // if this window was destroyed while autogrouping
2345 bool destroyed = false;
2346
2347 // check WM_CLASS only when we changed state to NormalState from
2348 // WithdrawnState (ICCC 4.1.2.5)
2349 client->updateWMClassHint();
2350 2344
2351 Workspace *wsp = screen().getWorkspace(m_workspace_number);
2352 if (wsp != 0 && isGroupable())
2353 destroyed = wsp->checkGrouping(*this);
2354
2355 // if we weren't grouped with another window we deiconify ourself
2356 // make sure iconified windows stay that way on fluxbox start
2357 if (!destroyed && !(iconic && Fluxbox::instance()->isStartup()))
2358 deiconify(false);
2359
2360 }
2361} 2345}
2362 2346
2363 2347
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) {
781#endif // DEBUG 781#endif // DEBUG
782 782
783 WinClient *winclient = searchWindow(e->xmaprequest.window); 783 WinClient *winclient = searchWindow(e->xmaprequest.window);
784 FluxboxWindow *win = 0;
785 784
786 if (! winclient) { 785 if (! winclient) {
787 BScreen *screen = 0; 786 BScreen *screen = 0;
@@ -807,15 +806,14 @@ void Fluxbox::handleEvent(XEvent * const e) {
807 if (screen == 0) { 806 if (screen == 0) {
808 cerr<<"Fluxbox "<<_FB_CONSOLETEXT(Fluxbox, CantMapWindow, "Warning! Could not find screen to map window on!", "")<<endl; 807 cerr<<"Fluxbox "<<_FB_CONSOLETEXT(Fluxbox, CantMapWindow, "Warning! Could not find screen to map window on!", "")<<endl;
809 } else 808 } else
810 win = screen->createWindow(e->xmaprequest.window); 809 screen->createWindow(e->xmaprequest.window);
811 810
812 } else { 811 } else {
813 win = winclient->fbwindow(); 812 // we don't handle MapRequest in FluxboxWindow::handleEvent
813 if (winclient->fbwindow())
814 winclient->fbwindow()->mapRequestEvent(e->xmaprequest);
814 } 815 }
815 816
816 // we don't handle MapRequest in FluxboxWindow::handleEvent
817 if (win)
818 win->mapRequestEvent(e->xmaprequest);
819 } 817 }
820 break; 818 break;
821 case MapNotify: 819 case MapNotify: