diff options
author | fluxgen <fluxgen> | 2002-02-09 16:41:53 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2002-02-09 16:41:53 (GMT) |
commit | 8248af0ef198335c27e12d9725425839edba87e5 (patch) | |
tree | d8ed0005cf54e5fde7d05e99830dc2d3f04153c0 | |
parent | 7ba22413a2cc10ef053cbd1a3ab09ca2d1f8fc0c (diff) | |
download | fluxbox_paul-8248af0ef198335c27e12d9725425839edba87e5.zip fluxbox_paul-8248af0ef198335c27e12d9725425839edba87e5.tar.bz2 |
Fixed bug in removeWindow
-rw-r--r-- | src/Workspace.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/Workspace.cc b/src/Workspace.cc index 81eb1e4..d92ef76 100644 --- a/src/Workspace.cc +++ b/src/Workspace.cc | |||
@@ -1,3 +1,6 @@ | |||
1 | // Workspace.cc for Fluxbox | ||
2 | // Copyright (c) 2001 - 2002 Henrik Kinnunen (fluxgen@linuxmail.org) | ||
3 | // | ||
1 | // Workspace.cc for Blackbox - an X11 Window manager | 4 | // Workspace.cc for Blackbox - an X11 Window manager |
2 | // Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) | 5 | // Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) |
3 | // | 6 | // |
@@ -19,7 +22,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
21 | 24 | ||
22 | // $Id: Workspace.cc,v 1.8 2002/02/09 11:48:18 fluxgen Exp $ | 25 | // $Id: Workspace.cc,v 1.9 2002/02/09 16:41:53 fluxgen Exp $ |
23 | 26 | ||
24 | // use GNU extensions | 27 | // use GNU extensions |
25 | #ifndef _GNU_SOURCE | 28 | #ifndef _GNU_SOURCE |
@@ -57,13 +60,9 @@ Workspace::Workspace(BScreen *scrn, int i): | |||
57 | screen(scrn), | 60 | screen(scrn), |
58 | lastfocus(0), | 61 | lastfocus(0), |
59 | name(""), | 62 | name(""), |
63 | id(i), | ||
60 | cascade_x(32), cascade_y(32) | 64 | cascade_x(32), cascade_y(32) |
61 | { | 65 | { |
62 | screen = scrn; | ||
63 | |||
64 | cascade_x = cascade_y = 32; | ||
65 | |||
66 | id = i; | ||
67 | 66 | ||
68 | clientmenu = new Clientmenu(this); | 67 | clientmenu = new Clientmenu(this); |
69 | 68 | ||
@@ -117,10 +116,11 @@ const int Workspace::removeWindow(FluxboxWindow *w) { | |||
117 | w->getTransientFor()->isVisible()) | 116 | w->getTransientFor()->isVisible()) |
118 | w->getTransientFor()->setInputFocus(); | 117 | w->getTransientFor()->setInputFocus(); |
119 | else { | 118 | else { |
120 | 119 | FluxboxWindow *top = 0; | |
121 | FluxboxWindow *top = stackingList.front(); | 120 | if (stackingList.size()!=0) |
122 | 121 | top = stackingList.front(); | |
123 | if (! top && ! top->setInputFocus()) { | 122 | |
123 | if (!top || !top->setInputFocus()) { | ||
124 | Fluxbox::instance()->setFocusedWindow((FluxboxWindow *) 0); | 124 | Fluxbox::instance()->setFocusedWindow((FluxboxWindow *) 0); |
125 | XSetInputFocus(Fluxbox::instance()->getXDisplay(), | 125 | XSetInputFocus(Fluxbox::instance()->getXDisplay(), |
126 | screen->getToolbar()->getWindowID(), | 126 | screen->getToolbar()->getWindowID(), |