summaryrefslogtreecommitdiff
authorzecke <zecke>2005-03-06 13:51:06 (UTC)
committer zecke <zecke>2005-03-06 13:51:06 (UTC)
commitfe51b2ed0ec3bccbcac880623123d2abc5d71a4e (patch) (side-by-side diff)
tree43d81f88823b8610c906d97418895379e45f7ae8
parentb9360499c5f84ab53e080861e0292a70e446f5e4 (diff)
downloadopie-fe51b2ed0ec3bccbcac880623123d2abc5d71a4e.zip
opie-fe51b2ed0ec3bccbcac880623123d2abc5d71a4e.tar.gz
opie-fe51b2ed0ec3bccbcac880623123d2abc5d71a4e.tar.bz2
Do not switch mode in the eventFilter when we're forced into one mode
(alwin thank you for noticing)
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opieui/big-screen/owidgetstack.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libopie2/opieui/big-screen/owidgetstack.cpp b/libopie2/opieui/big-screen/owidgetstack.cpp
index b14a643..00194b4 100644
--- a/libopie2/opieui/big-screen/owidgetstack.cpp
+++ b/libopie2/opieui/big-screen/owidgetstack.cpp
@@ -1,27 +1,27 @@
/*
               =. This file is part of the OPIE Project
-             .=l. Copyright (c) 2003 hOlgAr <zecke@handhelds.org>
+             .=l. Copyright (c) 2003,2004,2005 Holger Hans Peter Freyther <zecke@handhelds.org>
           .>+-=
 _;:,     .>    :=|. This library is free software; you can
.> <`_,   >  .   <= redistribute it and/or modify it under
:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
.="- .-=="i,     .._ License as published by the Free Software
 - .   .-<_>     .<> Foundation; either version 2 of the License,
     ._= =}       : or (at your option) any later version.
    .%`+i>       _;_.
    .i_,=:_.      -<s. This library is distributed in the hope that
     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
    : ..    .:,     . . . without even the implied warranty of
    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
..}^=.=       =       ; Library General Public License for more
++=   -.     .`     .: details.
 :     =  ...= . :.=-
 -.   .:....=;==+<; You should have received a copy of the GNU
  -_. . .   )=.  = Library General Public License along with
    --        :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
@@ -289,49 +289,49 @@ void OWidgetStack::raiseWidget( QWidget* wid) {
* Note that this method does not use visibleWIdget but remembers
* the last raisedWidget
*/
void OWidgetStack::hideWidget( int id) {
/* hiding our main widget wouldn't be smart */
if ( m_mode == BigScreen && m_last != m_mWidget )
m_last->hide();
raiseWidget( 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) {
- if ( e->type() == QEvent::Resize ) {
+ 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;
}
/**
* @internal_resons
*/
void OWidgetStack::resizeEvent( QResizeEvent* ev ) {
QFrame::resizeEvent( ev );
if (m_mode == SmallScreen )
m_stack->setGeometry( frameRect() );
else
if (m_mWidget )
m_mWidget->setGeometry( frameRect() );
}