summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opieui/big-screen/owidgetstack.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/libopie2/opieui/big-screen/owidgetstack.cpp b/libopie2/opieui/big-screen/owidgetstack.cpp
index 00194b4..ac46cca 100644
--- a/libopie2/opieui/big-screen/owidgetstack.cpp
+++ b/libopie2/opieui/big-screen/owidgetstack.cpp
@@ -300,25 +300,25 @@ void OWidgetStack::hideWidget( int id) {
* This is overloaded and only differs in the parameters
* it takes.
*/
void OWidgetStack::hideWidget( QWidget* wid) {
/* still not smart */
if ( m_mode == BigScreen && m_last != m_mWidget )
m_last->hide();
raiseWidget( wid );
}
-bool OWidgetStack::eventFilter( QObject* obj, QEvent* e) {
+bool OWidgetStack::eventFilter( QObject*, QEvent* e) {
if ( e->type() == QEvent::Resize && !m_forced ) {
QResizeEvent *res = static_cast<QResizeEvent*>( e );
QSize size = res->size();
if ( size.width() >= mode_size )
switchTop();
else
switchStack();
}
return false;
}
@@ -379,38 +379,43 @@ void OWidgetStack::setMainWindow( int id) {
/*
* this function switches to a stack ;)
*/
void OWidgetStack::switchStack() {
if (m_stack ) {
m_stack->setGeometry( frameRect() );
return;
}
m_mode = SmallScreen;
m_stack = new QWidgetStack(this);
+ m_stack->setGeometry( frameRect() );
+ m_stack->show();
connect(m_stack, SIGNAL(aboutToShow(QWidget*) ),
this, SIGNAL(aboutToShow(QWidget*) ) );
connect(m_stack, SIGNAL(aboutToShow(int) ),
this, SIGNAL(aboutToShow(int) ) );
/* now reparent the widgets... luckily QWidgetSatck does most of the work */
if (m_list.isEmpty() )
return;
QMap<int, QWidget*>::Iterator it = m_list.begin();
for ( ; it != m_list.end(); ++it )
m_stack->addWidget( it.data(), it.key() );
+ if ( m_mWidget )
+ m_stack->raiseWidget( m_mWidget );
+
}
/*
* we will switch to top level mode
* reparent the list of widgets and then delete the stack
*/
void OWidgetStack::switchTop() {
m_mode = BigScreen;
/* this works because it is guaranteed that switchStack was called at least once*/
if (!m_stack && m_mWidget) {
m_mWidget->setGeometry( frameRect() );