aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-02-27 22:04:01 (GMT)
committerfluxgen <fluxgen>2002-02-27 22:04:01 (GMT)
commit0cba1e7dffae670d1a4bbaa6fb300d6888f1e7ce (patch)
tree9c3da81fc3179b990a2ca26bb4dd548e08fdb157
parent64faaa975e4df02bbf49bc19a96e25e6bc191f3e (diff)
downloadfluxbox-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
-rw-r--r--src/Window.cc13
-rw-r--r--src/fluxbox.cc8
2 files changed, 11 insertions, 10 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
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index fbeb860..c2b616c 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.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: fluxbox.cc,v 1.36 2002/02/26 22:42:23 fluxgen Exp $ 25// $Id: fluxbox.cc,v 1.37 2002/02/27 22:04:01 fluxgen Exp $
26 26
27//Use some GNU extensions 27//Use some GNU extensions
28#ifndef _GNU_SOURCE 28#ifndef _GNU_SOURCE
@@ -2475,7 +2475,7 @@ void Fluxbox::setFocusedWindow(FluxboxWindow *win) {
2475 Toolbar *old_tbar = 0, *tbar = 0; 2475 Toolbar *old_tbar = 0, *tbar = 0;
2476 Workspace *old_wkspc = 0, *wkspc = 0; 2476 Workspace *old_wkspc = 0, *wkspc = 0;
2477 2477
2478 if (focused_window) { 2478 if (focused_window!=0) {
2479 old_win = focused_window; 2479 old_win = focused_window;
2480 old_screen = old_win->getScreen(); 2480 old_screen = old_win->getScreen();
2481 2481
@@ -2499,9 +2499,9 @@ void Fluxbox::setFocusedWindow(FluxboxWindow *win) {
2499 } else 2499 } else
2500 focused_window = (FluxboxWindow *) 0; 2500 focused_window = (FluxboxWindow *) 0;
2501 2501
2502 if (tbar) 2502 if (tbar!=0)
2503 tbar->redrawWindowLabel(True); 2503 tbar->redrawWindowLabel(True);
2504 if (screen) 2504 if (screen!=0)
2505 screen->updateNetizenWindowFocus(); 2505 screen->updateNetizenWindowFocus();
2506 2506
2507 if (old_tbar && old_tbar != tbar) 2507 if (old_tbar && old_tbar != tbar)