diff --git a/client.cpp b/client.cpp index 7bcbf183f4..c5fa1eca37 100644 --- a/client.cpp +++ b/client.cpp @@ -20,13 +20,13 @@ Copyright (C) 1999, 2000 Matthias Ettrich #include #include #include -#include #include #include "workspace.h" #include "client.h" #include "events.h" #include "atoms.h" #include // Needed in x11Event() below +#include #include #include #include diff --git a/client.h b/client.h index 7d4651a306..8d8bdb4d4b 100644 --- a/client.h +++ b/client.h @@ -11,6 +11,7 @@ Copyright (C) 1999, 2000 Matthias Ettrich #include #include #include +#include // it's not Bool safe, so include it here first #include #include #include diff --git a/clients/icewm/icewm.cpp b/clients/icewm/icewm.cpp index 0b92a20a72..7a94b9ce77 100644 --- a/clients/icewm/icewm.cpp +++ b/clients/icewm/icewm.cpp @@ -50,6 +50,7 @@ #include #include #include +#include #include "../../workspace.h" #include "../../options.h" #include "icewm.h" diff --git a/clients/kstep/nextclient.cpp b/clients/kstep/nextclient.cpp index 87df964105..b4aa8ca893 100644 --- a/clients/kstep/nextclient.cpp +++ b/clients/kstep/nextclient.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include diff --git a/clients/kwmtheme/kwmthemeclient.cpp b/clients/kwmtheme/kwmthemeclient.cpp index f40a3246d3..9ce6de25b5 100644 --- a/clients/kwmtheme/kwmthemeclient.cpp +++ b/clients/kwmtheme/kwmthemeclient.cpp @@ -3,11 +3,13 @@ #include #include #include +#include #include #include #include #include #include +#include #include "../../workspace.h" #include "../../options.h" @@ -231,9 +233,15 @@ void MyButton::drawButtonLabel(QPainter *p) // some visual notification of button presses. i.e. for MGBriezh int offset = (isDown() && ((pixmap()->width() >= width()) || (pixmap()->height() >= height()))) ? 1 : 0; +#if QT_VERSION < 300 style().drawItem(p, offset, offset, width(), height(), AlignCenter, colorGroup(), true, pixmap(), QString::null); +#else + style().drawItem(p, QRect( offset, offset, width(), height() ), + AlignCenter, colorGroup(), + true, pixmap(), QString::null); +#endif } } diff --git a/clients/mwm/mwmclient.cpp b/clients/mwm/mwmclient.cpp index 066e51a975..057d7ecebc 100644 --- a/clients/mwm/mwmclient.cpp +++ b/clients/mwm/mwmclient.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include #include "../../workspace.h" #include "../../options.h" diff --git a/clients/riscos/Manager.cpp b/clients/riscos/Manager.cpp index 5c2950caec..0b194728e6 100644 --- a/clients/riscos/Manager.cpp +++ b/clients/riscos/Manager.cpp @@ -29,11 +29,12 @@ #include #include -#include #include "../../options.h" #include "../../workspace.h" +#include + #include "Manager.h" #include "Static.h" #include "LowerButton.h" diff --git a/clients/web/Web.cpp b/clients/web/Web.cpp index 4b908df8a0..08e5383926 100644 --- a/clients/web/Web.cpp +++ b/clients/web/Web.cpp @@ -25,8 +25,8 @@ #include #include -#include #include +#include #undef Bool #include diff --git a/killwindow.cpp b/killwindow.cpp index bde98e981c..5529fdc7d7 100644 --- a/killwindow.cpp +++ b/killwindow.cpp @@ -8,6 +8,7 @@ Copyright (C) 1999, 2000 Matthias Ettrich //#define QT_CLEAN_NAMESPACE //#endif #include "killwindow.h" +#include #include #include #include diff --git a/tabbox.cpp b/tabbox.cpp index 996c437a05..9ff6609dab 100644 --- a/tabbox.cpp +++ b/tabbox.cpp @@ -10,6 +10,7 @@ Copyright (C) 1999, 2000 Matthias Ettrich #include #include #include +#include #undef Bool // f**king X11 #include #include @@ -201,8 +202,15 @@ void TabBox::paintEvent( QPaintEvent* ) { { QPainter p( this ); +#if QT_VERSION < 300 style().drawPanel( &p, 0, 0, width(), height(), colorGroup(), FALSE ); style().drawPanel( &p, 4, 4, width()-8, height()-8, colorGroup(), TRUE ); +#else + style().drawPrimitive( QStyle::PE_Panel, &p, QRect( 0, 0, width(), height() ), + colorGroup(), QStyle::Style_Default ); + style().drawPrimitive( QStyle::PE_Panel, &p, QRect( 4, 4, width()-8, height()-8 ), + colorGroup(), QStyle::Style_Sunken ); +#endif } paintContents(); } diff --git a/tabbox.h b/tabbox.h index 9ffe390bbf..2e59734b70 100644 --- a/tabbox.h +++ b/tabbox.h @@ -7,6 +7,7 @@ Copyright (C) 1999, 2000 Matthias Ettrich #define TABBOX_H #include #include +#include class QLabel; diff --git a/workspace.cpp b/workspace.cpp index bc8141a0fc..dc33266341 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -24,8 +24,6 @@ Copyright (C) 1999, 2000 Matthias Ettrich #include #include -#include - #include "workspace.h" #include "client.h" #include "tabbox.h" @@ -33,6 +31,7 @@ Copyright (C) 1999, 2000 Matthias Ettrich #include "plugins.h" #include "events.h" #include "killwindow.h" +#include #include #include #include @@ -3901,7 +3900,11 @@ void Workspace::updateClientArea() QRect Workspace::clientArea(clientAreaOption opt) { QRect rect = QApplication::desktop()->geometry(); +#if QT_VERSION < 300 KDesktopWidget *desktop = KApplication::desktop(); +#else + QDesktopWidget *desktop = KApplication::desktop(); +#endif switch (opt) { case MaximizeArea: