summaryrefslogtreecommitdiff
path: root/core/launcher/taskbar.cpp
Side-by-side diff
Diffstat (limited to 'core/launcher/taskbar.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/taskbar.cpp41
1 files changed, 22 insertions, 19 deletions
diff --git a/core/launcher/taskbar.cpp b/core/launcher/taskbar.cpp
index 37fdb30..2966168 100644
--- a/core/launcher/taskbar.cpp
+++ b/core/launcher/taskbar.cpp
@@ -19,24 +19,25 @@
**********************************************************************/
#include "startmenu.h"
#include "inputmethods.h"
#include "runningappbar.h"
#include "systray.h"
#include "wait.h"
#include "appicons.h"
#include "taskbar.h"
#include "server.h"
+#include <qtopia/config.h>
#include <qtopia/qpeapplication.h>
#ifdef QWS
#include <qtopia/qcopenvelope_qws.h>
#endif
#include <qtopia/global.h>
#include <qtopia/custom.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qtimer.h>
#ifdef QWS
#include <qwindowsystem_qws.h>
@@ -163,24 +164,28 @@ private:
bool nl, cl;
};
//---------------------------------------------------------------------------
TaskBar::~TaskBar()
{
}
TaskBar::TaskBar() : QHBox(0, 0, WStyle_Customize | WStyle_Tool | WStyle_StaysOnTop | WGroupLeader)
{
+ Config cfg( "Launcher" );
+ cfg.setGroup( "InputMethods" );
+ resizeRunningApp = cfg.readBoolEntry( "Resize", true );
+
sm = new StartMenu( this );
connect( sm, SIGNAL(tabSelected(const QString&)), this,
SIGNAL(tabSelected(const QString&)) );
inputMethods = new InputMethods( this );
connect( inputMethods, SIGNAL(inputToggled(bool)),
this, SLOT(calcMaxWindowRect()) );
stack = new QWidgetStack( this );
stack->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) );
label = new QLabel(stack);
@@ -282,44 +287,42 @@ void TaskBar::resizeEvent( QResizeEvent *e )
qWarning("TaskBar::resize event");
}
void TaskBar::styleChange( QStyle &s )
{
QHBox::styleChange( s );
calcMaxWindowRect();
}
void TaskBar::calcMaxWindowRect()
{
- /*
-#ifdef Q_WS_QWS
- QRect wr;
- int displayWidth = qApp->desktop()->width();
- QRect ir = inputMethods->inputRect();
- if ( ir.isValid() ) {
- wr.setCoords( 0, 0, displayWidth-1, ir.top()-1 );
- } else {
- wr.setCoords( 0, 0, displayWidth-1, y()-1 );
+ if ( resizeRunningApp )
+ {
+ #if defined(Q_WS_QWS)
+ QRect wr;
+ int displayWidth = qApp->desktop()->width();
+ QRect ir = inputMethods->inputRect();
+ if ( ir.isValid() ) {
+ wr.setCoords( 0, 0, displayWidth-1, ir.top()-1 );
+ } else {
+ wr.setCoords( 0, 0, displayWidth-1, y()-1 );
+ }
+ #if QT_VERSION < 0x030000
+ QWSServer::setMaxWindowRect( qt_screen->mapToDevice(wr,QSize(qt_screen->width(),qt_screen->height())) );
+ #else
+ QWSServer::setMaxWindowRect( wr );
+ #endif
+ #endif
}
-
-#if QT_VERSION < 0x030000
- QWSServer::setMaxWindowRect( qt_screen->mapToDevice(wr,
- QSize(qt_screen->width(),qt_screen->height()))
- );
-#else
- QWSServer::setMaxWindowRect( wr );
-#endif
-#endif
- */
}
void TaskBar::receive( const QCString &msg, const QByteArray &data )
{
QDataStream stream( data, IO_ReadOnly );
if ( msg == "message(QString)" ) {
QString text;
stream >> text;
setStatusMessage( text );
} else if ( msg == "hideInputMethod()" ) {
inputMethods->hideInputMethod();
} else if ( msg == "showInputMethod()" ) {