-rw-r--r-- | core/launcher/taskbar.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/launcher/taskbar.cpp b/core/launcher/taskbar.cpp index 91e2f20..86e0d0d 100644 --- a/core/launcher/taskbar.cpp +++ b/core/launcher/taskbar.cpp | |||
@@ -7,56 +7,59 @@ | |||
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "startmenu.h" | 21 | #include "startmenu.h" |
22 | #include "inputmethods.h" | 22 | #include "inputmethods.h" |
23 | #include "runningappbar.h" | 23 | #include "runningappbar.h" |
24 | #include "systray.h" | 24 | #include "systray.h" |
25 | #include "wait.h" | 25 | #include "wait.h" |
26 | #include "appicons.h" | 26 | #include "appicons.h" |
27 | 27 | ||
28 | #include "taskbar.h" | 28 | #include "taskbar.h" |
29 | #include "server.h" | 29 | #include "server.h" |
30 | 30 | ||
31 | /* OPIE */ | ||
32 | #include <opie2/odebug.h> | ||
31 | #include <qtopia/config.h> | 33 | #include <qtopia/config.h> |
32 | #include <qtopia/qpeapplication.h> | 34 | #include <qtopia/qpeapplication.h> |
33 | #ifdef QWS | 35 | #ifdef QWS |
34 | #include <qtopia/qcopenvelope_qws.h> | 36 | #include <qtopia/qcopenvelope_qws.h> |
35 | #endif | 37 | #endif |
36 | #include <qtopia/global.h> | 38 | #include <qtopia/global.h> |
37 | //#include <qtopia/custom.h> | 39 | using namespace Opie::Core; |
38 | 40 | ||
41 | /* QT */ | ||
39 | #include <qlabel.h> | 42 | #include <qlabel.h> |
40 | #include <qlayout.h> | 43 | #include <qlayout.h> |
41 | #include <qtimer.h> | 44 | #include <qtimer.h> |
42 | #ifdef QWS | 45 | #ifdef QWS |
43 | #include <qwindowsystem_qws.h> | 46 | #include <qwindowsystem_qws.h> |
44 | #endif | 47 | #endif |
45 | #include <qwidgetstack.h> | 48 | #include <qwidgetstack.h> |
46 | 49 | ||
47 | #if defined( Q_WS_QWS ) | 50 | #if defined( Q_WS_QWS ) |
48 | #include <qwsdisplay_qws.h> | 51 | #include <qwsdisplay_qws.h> |
49 | #include <qgfx_qws.h> | 52 | #include <qgfx_qws.h> |
50 | #endif | 53 | #endif |
51 | 54 | ||
52 | 55 | ||
53 | static bool initNumLock() | 56 | static bool initNumLock() |
54 | { | 57 | { |
55 | #ifdef QPE_INITIAL_NUMLOCK_STATE | 58 | #ifdef QPE_INITIAL_NUMLOCK_STATE |
56 | QPE_INITIAL_NUMLOCK_STATE | 59 | QPE_INITIAL_NUMLOCK_STATE |
57 | #endif | 60 | #endif |
58 | return FALSE; | 61 | return FALSE; |
59 | } | 62 | } |
60 | 63 | ||
61 | //--------------------------------------------------------------------------- | 64 | //--------------------------------------------------------------------------- |
62 | 65 | ||
@@ -264,49 +267,49 @@ void TaskBar::stopWait(const QString&) | |||
264 | 267 | ||
265 | void TaskBar::stopWait() | 268 | void TaskBar::stopWait() |
266 | { | 269 | { |
267 | waitTimer->stop(); | 270 | waitTimer->stop(); |
268 | waitIcon->setWaiting( false ); | 271 | waitIcon->setWaiting( false ); |
269 | } | 272 | } |
270 | 273 | ||
271 | /* | 274 | /* |
272 | * This resizeEvent will be captured by | 275 | * This resizeEvent will be captured by |
273 | * the ServerInterface and it'll layout | 276 | * the ServerInterface and it'll layout |
274 | * and calc rect. Now if we go from bigger | 277 | * and calc rect. Now if we go from bigger |
275 | * to smaller screen the SysTray is out of | 278 | * to smaller screen the SysTray is out of |
276 | * bounds and repaint() won't trigger an Event | 279 | * bounds and repaint() won't trigger an Event |
277 | */ | 280 | */ |
278 | void TaskBar::resizeEvent( QResizeEvent *e ) | 281 | void TaskBar::resizeEvent( QResizeEvent *e ) |
279 | { | 282 | { |
280 | if ( sysTray ) | 283 | if ( sysTray ) |
281 | sysTray->hide(); | 284 | sysTray->hide(); |
282 | 285 | ||
283 | QHBox::resizeEvent( e ); | 286 | QHBox::resizeEvent( e ); |
284 | 287 | ||
285 | if ( sysTray ) | 288 | if ( sysTray ) |
286 | sysTray->show(); | 289 | sysTray->show(); |
287 | 290 | ||
288 | qWarning("TaskBar::resize event"); | 291 | owarn << "TaskBar::resize event" << oendl; |
289 | } | 292 | } |
290 | 293 | ||
291 | void TaskBar::styleChange( QStyle &s ) | 294 | void TaskBar::styleChange( QStyle &s ) |
292 | { | 295 | { |
293 | QHBox::styleChange( s ); | 296 | QHBox::styleChange( s ); |
294 | calcMaxWindowRect(); | 297 | calcMaxWindowRect(); |
295 | } | 298 | } |
296 | 299 | ||
297 | void TaskBar::calcMaxWindowRect() | 300 | void TaskBar::calcMaxWindowRect() |
298 | { | 301 | { |
299 | if ( resizeRunningApp ) | 302 | if ( resizeRunningApp ) |
300 | { | 303 | { |
301 | #if defined(Q_WS_QWS) | 304 | #if defined(Q_WS_QWS) |
302 | QRect wr; | 305 | QRect wr; |
303 | int displayWidth = qApp->desktop()->width(); | 306 | int displayWidth = qApp->desktop()->width(); |
304 | QRect ir = inputMethods->inputRect(); | 307 | QRect ir = inputMethods->inputRect(); |
305 | if ( ir.isValid() ) { | 308 | if ( ir.isValid() ) { |
306 | wr.setCoords( 0, 0, displayWidth-1, ir.top()-1 ); | 309 | wr.setCoords( 0, 0, displayWidth-1, ir.top()-1 ); |
307 | } else { | 310 | } else { |
308 | wr.setCoords( 0, 0, displayWidth-1, y()-1 ); | 311 | wr.setCoords( 0, 0, displayWidth-1, y()-1 ); |
309 | } | 312 | } |
310 | #if QT_VERSION < 0x030000 | 313 | #if QT_VERSION < 0x030000 |
311 | QWSServer::setMaxWindowRect( qt_screen->mapToDevice(wr,QSize(qt_screen->width(),qt_screen->height())) ); | 314 | QWSServer::setMaxWindowRect( qt_screen->mapToDevice(wr,QSize(qt_screen->width(),qt_screen->height())) ); |
312 | #else | 315 | #else |