diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Window.cc | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/src/Window.cc b/src/Window.cc index 2c7103b..59739a7 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -504,19 +504,8 @@ void FluxboxWindow::init() { | |||
504 | } | 504 | } |
505 | 505 | ||
506 | associateClientWindow(true, wattrib.x, wattrib.y, wattrib.width, wattrib.height); | 506 | associateClientWindow(true, wattrib.x, wattrib.y, wattrib.width, wattrib.height); |
507 | |||
508 | |||
509 | Fluxbox::instance()->attachSignals(*this); | ||
510 | |||
511 | // this window is managed, we are now allowed to modify actual state | ||
512 | m_initialized = true; | ||
513 | |||
514 | |||
515 | |||
516 | applyDecorations(true); | 507 | applyDecorations(true); |
517 | |||
518 | grabButtons(); | 508 | grabButtons(); |
519 | |||
520 | restoreAttributes(); | 509 | restoreAttributes(); |
521 | 510 | ||
522 | if (m_workspace_number < 0 || m_workspace_number >= screen().getCount()) | 511 | if (m_workspace_number < 0 || m_workspace_number >= screen().getCount()) |
@@ -548,8 +537,6 @@ void FluxboxWindow::init() { | |||
548 | if (wattrib.height <= 0) | 537 | if (wattrib.height <= 0) |
549 | wattrib.height = 1; | 538 | wattrib.height = 1; |
550 | 539 | ||
551 | |||
552 | |||
553 | // if we're a transient then we should be on the same layer as our parent | 540 | // if we're a transient then we should be on the same layer as our parent |
554 | if (m_client->isTransient() && | 541 | if (m_client->isTransient() && |
555 | m_client->transientFor()->fbwindow() && | 542 | m_client->transientFor()->fbwindow() && |
@@ -570,12 +557,9 @@ void FluxboxWindow::init() { | |||
570 | if (!place_window) | 557 | if (!place_window) |
571 | moveResize(frame().x(), frame().y(), frame().width(), frame().height()); | 558 | moveResize(frame().x(), frame().y(), frame().width(), frame().height()); |
572 | 559 | ||
573 | |||
574 | |||
575 | screen().getWorkspace(m_workspace_number)->addWindow(*this, place_window); | 560 | screen().getWorkspace(m_workspace_number)->addWindow(*this, place_window); |
576 | setWorkspace(m_workspace_number); | 561 | setWorkspace(m_workspace_number); |
577 | 562 | ||
578 | |||
579 | if (shaded) { // start shaded | 563 | if (shaded) { // start shaded |
580 | shaded = false; | 564 | shaded = false; |
581 | shade(); | 565 | shade(); |
@@ -594,6 +578,10 @@ void FluxboxWindow::init() { | |||
594 | stick(); | 578 | stick(); |
595 | deiconify(); //we're omnipresent and visible | 579 | deiconify(); //we're omnipresent and visible |
596 | } | 580 | } |
581 | |||
582 | Fluxbox::instance()->attachSignals(*this); | ||
583 | // this window is managed, we are now allowed to modify actual state | ||
584 | m_initialized = true; | ||
597 | 585 | ||
598 | sendConfigureNotify(); | 586 | sendConfigureNotify(); |
599 | // no focus default | 587 | // no focus default |
@@ -3545,6 +3533,14 @@ void FluxboxWindow::restore(bool remap) { | |||
3545 | #ifdef DEBUG | 3533 | #ifdef DEBUG |
3546 | cerr<<"restore("<<remap<<")"<<endl; | 3534 | cerr<<"restore("<<remap<<")"<<endl; |
3547 | #endif // DEBUG | 3535 | #endif // DEBUG |
3536 | |||
3537 | if (isShaded()) { | ||
3538 | if (!isIconic()) | ||
3539 | setState(NormalState, false); | ||
3540 | if (frame().isShaded()) | ||
3541 | frame().shade(); | ||
3542 | } | ||
3543 | |||
3548 | while (!clientList().empty()) { | 3544 | while (!clientList().empty()) { |
3549 | restore(clientList().back(), remap); | 3545 | restore(clientList().back(), remap); |
3550 | // deleting winClient removes it from the clientList | 3546 | // deleting winClient removes it from the clientList |