if ( idx == -1 )
return;
+ myWin = 0;
+ myArea = 0;
+
QtxWorkstackArea* newArea = neighbourArea( area );
- if ( newArea )
- newArea->setFocus();
+ if ( newArea && newArea->activeWidget() )
+ newArea->activeWidget()->setFocus();
QApplication::postEvent( this, new QCustomEvent( QEvent::User ) );
}
wid = wid->parentWidget();
}
if ( ok )
- QApplication::postEvent( this, new QCustomEvent( (QEvent::Type)( e->type() == QEvent::FocusIn ? ActivateEvent : FocusEvent ) ) );
+ QApplication::postEvent( this, new QCustomEvent( (QEvent::Type)( e->type() == QEvent::FocusIn ? ActivateWidget : FocusWidget ) ) );
}
}
return false;
{
switch ( e->type() )
{
- case ActivateEvent:
+ case ActivateWidget:
emit activated( activeWidget() );
break;
- case FocusEvent:
- if ( activeWidget() )
+ case FocusWidget:
+ if ( activeWidget() && !activeWidget()->focusWidget() )
activeWidget()->setFocus();
break;
- case RemoveEvent:
+ case RemoveWidget:
removeWidget( (QWidget*)e->data() );
break;
}
myChild.remove( wid );
- QApplication::postEvent( this, new QCustomEvent( (QEvent::Type)RemoveEvent, wid ) );
+ QApplication::postEvent( this, new QCustomEvent( (QEvent::Type)RemoveWidget, wid ) );
}
void QtxWorkstackArea::onChildShown( QtxWorkstackChild* c )