diff options
author | fluxgen <fluxgen> | 2002-02-27 22:04:01 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2002-02-27 22:04:01 (GMT) |
commit | 0cba1e7dffae670d1a4bbaa6fb300d6888f1e7ce (patch) | |
tree | 9c3da81fc3179b990a2ca26bb4dd548e08fdb157 /src/Window.cc | |
parent | 64faaa975e4df02bbf49bc19a96e25e6bc191f3e (diff) | |
download | fluxbox-0cba1e7dffae670d1a4bbaa6fb300d6888f1e7ce.zip fluxbox-0cba1e7dffae670d1a4bbaa6fb300d6888f1e7ce.tar.bz2 |
fixed the focusbug when deleting a window which calls Fluxbox::setFocusedWindow and the calls FluxboxWindow::setFocusFlag on the same window
Diffstat (limited to 'src/Window.cc')
-rw-r--r-- | src/Window.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/Window.cc b/src/Window.cc index ee149a2..843687d 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // 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 |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Window.cc,v 1.30 2002/02/26 22:35:58 fluxgen Exp $ | 25 | // $Id: Window.cc,v 1.31 2002/02/27 22:04:01 fluxgen Exp $ |
26 | 26 | ||
27 | //use GNU extensions | 27 | //use GNU extensions |
28 | #ifndef _GNU_SOURCE | 28 | #ifndef _GNU_SOURCE |
@@ -406,6 +406,7 @@ FluxboxWindow::~FluxboxWindow(void) { | |||
406 | if (timer) { | 406 | if (timer) { |
407 | if (timer->isTiming()) timer->stop(); | 407 | if (timer->isTiming()) timer->stop(); |
408 | delete timer; | 408 | delete timer; |
409 | timer = 0; | ||
409 | } | 410 | } |
410 | 411 | ||
411 | if (windowmenu) | 412 | if (windowmenu) |
@@ -417,18 +418,18 @@ FluxboxWindow::~FluxboxWindow(void) { | |||
417 | if (client.icon_title) | 418 | if (client.icon_title) |
418 | delete [] client.icon_title; | 419 | delete [] client.icon_title; |
419 | 420 | ||
420 | if (tab) | 421 | if (tab!=0) |
421 | delete tab; | 422 | delete tab; |
422 | tab = 0; | 423 | tab = 0; |
423 | 424 | ||
424 | if (client.mwm_hint) | 425 | if (client.mwm_hint!=0) |
425 | XFree(client.mwm_hint); | 426 | XFree(client.mwm_hint); |
426 | 427 | ||
427 | if (client.blackbox_hint) | 428 | if (client.blackbox_hint!=0) |
428 | XFree(client.blackbox_hint); | 429 | XFree(client.blackbox_hint); |
429 | 430 | ||
430 | //TODO: Move this to Workspace::removeWindow | 431 | //TODO: Move this to Workspace::removeWindow |
431 | if (client.transient_for) | 432 | if (client.transient_for!=0) |
432 | fluxbox->setFocusedWindow(client.transient_for); | 433 | fluxbox->setFocusedWindow(client.transient_for); |
433 | 434 | ||
434 | if (client.window_group) | 435 | if (client.window_group) |
@@ -2433,7 +2434,7 @@ void FluxboxWindow::setFocusFlag(bool focus) { | |||
2433 | } | 2434 | } |
2434 | 2435 | ||
2435 | if ((screen->isSloppyFocus() || screen->isSemiSloppyFocus()) && | 2436 | if ((screen->isSloppyFocus() || screen->isSemiSloppyFocus()) && |
2436 | screen->doAutoRaise()) | 2437 | screen->doAutoRaise() && timer!=0 ) |
2437 | timer->stop(); | 2438 | timer->stop(); |
2438 | } | 2439 | } |
2439 | 2440 | ||