Namespace cleanup to prevent crashes due to symbol clashes with RTLD_GLOBAL
svn path=/trunk/kdebase/kwin/; revision=174118
This commit is contained in:
parent
ec918cec3b
commit
36aebe0323
39 changed files with 234 additions and 138 deletions
|
@ -17,10 +17,13 @@
|
|||
#include <qbitmap.h>
|
||||
#include "../../workspace.h"
|
||||
#include "../../options.h"
|
||||
#include "bitmaps.h"
|
||||
|
||||
using namespace KWinInternal;
|
||||
|
||||
namespace B2 {
|
||||
|
||||
#include "bitmaps.h"
|
||||
|
||||
#define P_CLOSE 0
|
||||
#define P_MAX 1
|
||||
#define P_NORMALIZE 2
|
||||
|
@ -192,8 +195,8 @@ void B2Button::setPixmaps(KPixmap *pix, KPixmap *pixDown, KPixmap *iPix,
|
|||
void B2Button::setPixmaps(int button_id)
|
||||
{
|
||||
button_id *= 4;
|
||||
setPixmaps(::pixmap[button_id], ::pixmap[button_id+1],
|
||||
::pixmap[button_id+2], ::pixmap[button_id+3]);
|
||||
setPixmaps(B2::pixmap[button_id], B2::pixmap[button_id+1],
|
||||
B2::pixmap[button_id+2], B2::pixmap[button_id+3]);
|
||||
}
|
||||
|
||||
void B2Button::mousePressEvent( QMouseEvent* e )
|
||||
|
@ -926,27 +929,29 @@ void B2Client::positionButtons()
|
|||
titlebar->move(bar_x_ofs, 0);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
extern "C"
|
||||
{
|
||||
Client *allocate(Workspace *ws, WId w, int)
|
||||
{
|
||||
return(new B2Client(ws, w));
|
||||
return(new B2::B2Client(ws, w));
|
||||
}
|
||||
void init()
|
||||
{
|
||||
read_config();
|
||||
create_pixmaps();
|
||||
B2::read_config();
|
||||
B2::create_pixmaps();
|
||||
}
|
||||
void reset()
|
||||
{
|
||||
read_config();
|
||||
redraw_pixmaps();
|
||||
B2::read_config();
|
||||
B2::redraw_pixmaps();
|
||||
// Ensure change in tooltip state gets applied
|
||||
Workspace::self()->slotResetAllClientsDelayed();
|
||||
KWinInternal::Workspace::self()->slotResetAllClientsDelayed();
|
||||
}
|
||||
void deinit()
|
||||
{
|
||||
delete_pixmaps();
|
||||
B2::delete_pixmaps();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,9 +20,11 @@ class QSpacerItem;
|
|||
class QBoxLayout;
|
||||
class QGridLayout;
|
||||
|
||||
namespace KWinInternal {
|
||||
namespace B2 {
|
||||
|
||||
class B2Button : public KWinInternal::KWinButton
|
||||
using namespace KWinInternal;
|
||||
|
||||
class B2Button : public KWinButton
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -83,7 +85,7 @@ protected:
|
|||
B2Client *client;
|
||||
};
|
||||
|
||||
class B2Client : public KWinInternal::Client
|
||||
class B2Client : public Client
|
||||
{
|
||||
Q_OBJECT
|
||||
friend class B2Titlebar;
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
using namespace KWinInternal;
|
||||
|
||||
namespace
|
||||
namespace Default
|
||||
{
|
||||
|
||||
static unsigned char iconify_bits[] = {
|
||||
|
@ -121,7 +121,6 @@ bool largeToolButtons;
|
|||
int toolTitleHeight;
|
||||
int normalTitleHeight;
|
||||
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
|
@ -1080,28 +1079,29 @@ void KDEDefaultClient::menuButtonPressed()
|
|||
button[BtnMenu]->setDown(false);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Extended KWin plugin interface
|
||||
extern "C"
|
||||
{
|
||||
Client *allocate(Workspace *ws, WId w, int)
|
||||
{
|
||||
return(new KDEDefaultClient(ws, w));
|
||||
return(new Default::KDEDefaultClient(ws, w));
|
||||
}
|
||||
|
||||
void init()
|
||||
{
|
||||
clientHandler = new KDEDefaultHandler();
|
||||
Default::clientHandler = new Default::KDEDefaultHandler();
|
||||
}
|
||||
|
||||
void reset()
|
||||
{
|
||||
clientHandler->reset();
|
||||
Default::clientHandler->reset();
|
||||
}
|
||||
|
||||
void deinit()
|
||||
{
|
||||
delete clientHandler;
|
||||
delete Default::clientHandler;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,9 @@
|
|||
class QSpacerItem;
|
||||
class QBoxLayout;
|
||||
|
||||
namespace KWinInternal {
|
||||
namespace Default {
|
||||
|
||||
using namespace KWinInternal;
|
||||
|
||||
class KDEDefaultHandler: public QObject
|
||||
{
|
||||
|
@ -42,7 +44,7 @@ class KDEDefaultHandler: public QObject
|
|||
};
|
||||
|
||||
|
||||
class KDEDefaultButton : public KWinInternal::KWinButton
|
||||
class KDEDefaultButton : public KWinButton
|
||||
{
|
||||
public:
|
||||
KDEDefaultButton(Client *parent=0, const char *name=0,
|
||||
|
@ -73,7 +75,7 @@ class KDEDefaultButton : public KWinInternal::KWinButton
|
|||
};
|
||||
|
||||
|
||||
class KDEDefaultClient : public KWinInternal::Client
|
||||
class KDEDefaultClient : public Client
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
|
||||
using namespace KWinInternal;
|
||||
|
||||
namespace IceWM {
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Here's the global pixmap stuff - as memory efficient as it can be :)
|
||||
|
@ -1362,17 +1363,18 @@ void IceWMClient::menuButtonPressed()
|
|||
button[BtnSysMenu]->setDown(false);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
extern "C"
|
||||
{
|
||||
Client* allocate(Workspace *ws, WId w, int)
|
||||
{
|
||||
return(new IceWMClient(ws, w));
|
||||
return(new IceWM::IceWMClient(ws, w));
|
||||
}
|
||||
|
||||
void init()
|
||||
{
|
||||
clientHandler = new ThemeHandler;
|
||||
IceWM::clientHandler = new IceWM::ThemeHandler;
|
||||
}
|
||||
|
||||
void reset()
|
||||
|
@ -1382,7 +1384,7 @@ extern "C"
|
|||
|
||||
void deinit()
|
||||
{
|
||||
delete clientHandler;
|
||||
delete IceWM::clientHandler;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,9 @@ class QSpacerItem;
|
|||
class QBoxLayout;
|
||||
class QGridLayout;
|
||||
|
||||
namespace KWinInternal {
|
||||
namespace IceWM {
|
||||
|
||||
using namespace KWinInternal;
|
||||
|
||||
// Pixmap group
|
||||
enum { InActive=0, Active };
|
||||
|
@ -92,7 +94,7 @@ class ThemeHandler: public QObject
|
|||
};
|
||||
|
||||
|
||||
class IceWMButton : public KWinInternal::KWinButton
|
||||
class IceWMButton : public KWinButton
|
||||
{
|
||||
public:
|
||||
IceWMButton( Client *parent=0, const char *name=0,
|
||||
|
@ -116,7 +118,7 @@ class IceWMButton : public KWinInternal::KWinButton
|
|||
};
|
||||
|
||||
|
||||
class IceWMClient : public KWinInternal::Client
|
||||
class IceWMClient : public Client
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
|
|
@ -22,7 +22,7 @@ Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
|
|||
|
||||
using namespace KWinInternal;
|
||||
|
||||
namespace
|
||||
namespace KDE1
|
||||
{
|
||||
|
||||
QPixmap* close_pix = 0;
|
||||
|
@ -215,7 +215,6 @@ void drawGradient
|
|||
}
|
||||
}
|
||||
|
||||
} // anyonmous namespace
|
||||
|
||||
void StdClient::slotReset()
|
||||
{
|
||||
|
@ -566,28 +565,30 @@ void StdToolClient::slotReset()
|
|||
setFont(options->font(isActive(), true ));
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
extern "C"
|
||||
{
|
||||
Client * allocate(Workspace * workSpace, WId winId, int tool )
|
||||
{
|
||||
if ( tool )
|
||||
return new StdToolClient( workSpace, winId );
|
||||
return new StdClient(workSpace, winId);
|
||||
return new KDE1::StdToolClient( workSpace, winId );
|
||||
return new KDE1::StdClient(workSpace, winId);
|
||||
}
|
||||
void init()
|
||||
{
|
||||
create_pixmaps();
|
||||
KDE1::create_pixmaps();
|
||||
}
|
||||
void reset()
|
||||
{
|
||||
delete_pixmaps();
|
||||
create_pixmaps();
|
||||
KDE1::delete_pixmaps();
|
||||
KDE1::create_pixmaps();
|
||||
// Ensure change in tooltip state gets applied
|
||||
Workspace::self()->slotResetAllClientsDelayed();
|
||||
}
|
||||
void deinit()
|
||||
{
|
||||
delete_pixmaps();
|
||||
KDE1::delete_pixmaps();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -11,9 +11,11 @@ Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
|
|||
class QLabel;
|
||||
class QSpacerItem;
|
||||
|
||||
namespace KWinInternal {
|
||||
namespace KDE1 {
|
||||
|
||||
class StdClient : public KWinInternal::Client
|
||||
using namespace KWinInternal;
|
||||
|
||||
class StdClient : public Client
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -69,7 +71,7 @@ private:
|
|||
Like QToolButton, but provides a clicked(int) signals that
|
||||
has the last pressed mouse button as argument
|
||||
*/
|
||||
class ThreeButtonButton: public KWinInternal:: KWinToolButton
|
||||
class ThreeButtonButton: public KWinToolButton
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
#include "keramik.moc"
|
||||
|
||||
using namespace Keramik;
|
||||
using namespace KWinInternal;
|
||||
|
||||
|
||||
|
||||
|
@ -128,8 +128,6 @@ namespace Keramik
|
|||
KeramikHandler *clientHandler = NULL;
|
||||
bool keramik_initialized = false;
|
||||
|
||||
} // namespace Keramik
|
||||
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------------------------
|
||||
|
@ -1428,7 +1426,7 @@ Client::MousePosition KeramikClient::mousePosition( const QPoint &p ) const
|
|||
return Center;
|
||||
}
|
||||
|
||||
|
||||
}; // namespace Keramik
|
||||
|
||||
// -------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -1438,22 +1436,22 @@ extern "C"
|
|||
{
|
||||
Client *allocate( Workspace *ws, WId w )
|
||||
{
|
||||
return new KeramikClient( ws, w );
|
||||
return new Keramik::KeramikClient( ws, w );
|
||||
}
|
||||
|
||||
void init()
|
||||
{
|
||||
clientHandler = new KeramikHandler();
|
||||
Keramik::clientHandler = new Keramik::KeramikHandler();
|
||||
}
|
||||
|
||||
void reset()
|
||||
{
|
||||
clientHandler->reset();
|
||||
Keramik::clientHandler->reset();
|
||||
}
|
||||
|
||||
void deinit()
|
||||
{
|
||||
delete clientHandler;
|
||||
delete Keramik::clientHandler;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
using namespace KWinInternal;
|
||||
|
||||
|
||||
namespace KStep {
|
||||
|
||||
static unsigned char close_bits[] = {
|
||||
0x03, 0x03, 0x87, 0x03, 0xce, 0x01, 0xfc, 0x00, 0x78, 0x00, 0x78, 0x00,
|
||||
|
@ -560,26 +561,28 @@ NextClient::mousePosition( const QPoint& p ) const
|
|||
return m;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
extern "C"
|
||||
{
|
||||
Client *allocate(Workspace *ws, WId w, int )
|
||||
{
|
||||
return(new NextClient(ws, w));
|
||||
return(new KStep::NextClient(ws, w));
|
||||
}
|
||||
void init()
|
||||
{
|
||||
create_pixmaps();
|
||||
KStep::create_pixmaps();
|
||||
}
|
||||
void reset()
|
||||
{
|
||||
delete_pixmaps();
|
||||
create_pixmaps();
|
||||
KStep::delete_pixmaps();
|
||||
KStep::create_pixmaps();
|
||||
// Ensure change in tooltip state gets applied
|
||||
Workspace::self()->slotResetAllClientsDelayed();
|
||||
}
|
||||
void deinit()
|
||||
{
|
||||
delete_pixmaps();
|
||||
KStep::delete_pixmaps();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,9 +10,11 @@
|
|||
class QLabel;
|
||||
class QSpacerItem;
|
||||
|
||||
namespace KWinInternal {
|
||||
namespace KStep {
|
||||
|
||||
class NextButton : public KWinInternal::KWinButton
|
||||
using namespace KWinInternal;
|
||||
|
||||
class NextButton : public KWinButton
|
||||
{
|
||||
public:
|
||||
NextButton(Client *parent=0, const char *name=0,
|
||||
|
@ -34,7 +36,7 @@ protected:
|
|||
ButtonState last_button;
|
||||
};
|
||||
|
||||
class NextClient : public KWinInternal::Client
|
||||
class NextClient : public Client
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
using namespace KWinInternal;
|
||||
|
||||
namespace KWMTheme {
|
||||
|
||||
|
||||
/* static QPixmap stretchPixmap(QPixmap& src, bool stretchVert){
|
||||
QPixmap dest;
|
||||
|
@ -803,25 +805,27 @@ void KWMThemeClient::init()
|
|||
//
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
extern "C"
|
||||
{
|
||||
Client *allocate(Workspace *ws, WId w)
|
||||
{
|
||||
return(new KWMThemeClient(ws, w));
|
||||
return(new KWMTheme::KWMThemeClient(ws, w));
|
||||
}
|
||||
void init()
|
||||
{
|
||||
create_pixmaps();
|
||||
KWMTheme::create_pixmaps();
|
||||
}
|
||||
void reset()
|
||||
{
|
||||
delete_pixmaps();
|
||||
create_pixmaps();
|
||||
KWMTheme::delete_pixmaps();
|
||||
KWMTheme::create_pixmaps();
|
||||
Workspace::self()->slotResetAllClientsDelayed();
|
||||
}
|
||||
void deinit()
|
||||
{
|
||||
delete_pixmaps();
|
||||
KWMTheme::delete_pixmaps();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,9 +10,11 @@ class QLabel;
|
|||
class QSpacerItem;
|
||||
class QGridLayout;
|
||||
|
||||
namespace KWinInternal{
|
||||
namespace KWMTheme {
|
||||
|
||||
class MyButton : public KWinInternal::KWinToolButton
|
||||
using namespace KWinInternal;
|
||||
|
||||
class MyButton : public KWinToolButton
|
||||
{
|
||||
public:
|
||||
MyButton(QWidget *parent=0, const char *name=0, const QString& tip=NULL)
|
||||
|
@ -21,7 +23,7 @@ protected:
|
|||
void drawButtonLabel(QPainter *p);
|
||||
};
|
||||
|
||||
class KWMThemeClient : public KWinInternal::Client
|
||||
class KWMThemeClient : public Client
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
|
|
@ -13,9 +13,10 @@
|
|||
#include "../../workspace.h"
|
||||
#include "../../options.h"
|
||||
|
||||
|
||||
using namespace KWinInternal;
|
||||
|
||||
|
||||
namespace Laptop {
|
||||
|
||||
static unsigned char iconify_bits[] = {
|
||||
0xff, 0xff, 0x00, 0xff, 0xff, 0x7e, 0x3c, 0x18};
|
||||
|
@ -681,26 +682,28 @@ LaptopClient::mousePosition( const QPoint& p ) const
|
|||
return m;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
extern "C"
|
||||
{
|
||||
Client *allocate(Workspace *ws, WId w, int)
|
||||
{
|
||||
return(new LaptopClient(ws, w));
|
||||
return(new Laptop::LaptopClient(ws, w));
|
||||
}
|
||||
void init()
|
||||
{
|
||||
create_pixmaps();
|
||||
Laptop::create_pixmaps();
|
||||
}
|
||||
void reset()
|
||||
{
|
||||
delete_pixmaps();
|
||||
create_pixmaps();
|
||||
Laptop::delete_pixmaps();
|
||||
Laptop::create_pixmaps();
|
||||
// Ensure change in tooltip state gets applied
|
||||
Workspace::self()->slotResetAllClientsDelayed();
|
||||
}
|
||||
void deinit()
|
||||
{
|
||||
delete_pixmaps();
|
||||
Laptop::delete_pixmaps();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,9 +9,11 @@ class QLabel;
|
|||
class QSpacerItem;
|
||||
class QBoxLayout;
|
||||
|
||||
namespace KWinInternal {
|
||||
namespace Laptop {
|
||||
|
||||
class LaptopClientButton : public KWinInternal::KWinButton
|
||||
using namespace KWinInternal;
|
||||
|
||||
class LaptopClientButton : public KWinButton
|
||||
{
|
||||
public:
|
||||
LaptopClientButton(int w, int h, Client *parent=0, const char *name=0,
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
using namespace KWinInternal;
|
||||
|
||||
namespace ModernSystem {
|
||||
|
||||
static unsigned char iconify_bits[] = {
|
||||
0x00, 0x00, 0xff, 0xff, 0x7e, 0x3c, 0x18, 0x00};
|
||||
|
@ -614,30 +615,31 @@ Client::MousePosition ModernSys::mousePosition( const QPoint& p) const
|
|||
return m;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// KWin extended plugin interface
|
||||
extern "C"
|
||||
{
|
||||
Client *allocate(Workspace *ws, WId w, int)
|
||||
{
|
||||
return(new ModernSys(ws, w));
|
||||
return(new ModernSystem::ModernSys(ws, w));
|
||||
}
|
||||
void init()
|
||||
{
|
||||
button_pattern = new QString;
|
||||
create_pixmaps();
|
||||
read_config();
|
||||
ModernSystem::button_pattern = new QString;
|
||||
ModernSystem::create_pixmaps();
|
||||
ModernSystem::read_config();
|
||||
}
|
||||
void reset()
|
||||
{
|
||||
read_config();
|
||||
delete_pixmaps();
|
||||
create_pixmaps();
|
||||
ModernSystem::read_config();
|
||||
ModernSystem::delete_pixmaps();
|
||||
ModernSystem::create_pixmaps();
|
||||
}
|
||||
void deinit()
|
||||
{
|
||||
delete_pixmaps();
|
||||
delete button_pattern;
|
||||
ModernSystem::delete_pixmaps();
|
||||
delete ModernSystem::button_pattern;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,9 +10,11 @@
|
|||
class QLabel;
|
||||
class QSpacerItem;
|
||||
|
||||
namespace KWinInternal {
|
||||
namespace ModernSystem {
|
||||
|
||||
class ModernButton : public KWinInternal::KWinButton
|
||||
using namespace KWinInternal;
|
||||
|
||||
class ModernButton : public KWinButton
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -34,7 +36,7 @@ public:
|
|||
int last_button;
|
||||
};
|
||||
|
||||
class ModernSys : public KWinInternal::Client
|
||||
class ModernSys : public Client
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
|
|
@ -27,8 +27,10 @@
|
|||
#include "quartz.h"
|
||||
#include <qimage.h>
|
||||
|
||||
|
||||
using namespace KWinInternal;
|
||||
|
||||
namespace Quartz {
|
||||
|
||||
static unsigned char iconify_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00,
|
||||
|
@ -796,6 +798,7 @@ void QuartzClient::menuButtonPressed()
|
|||
button[BtnMenu]->setDown(false);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Extended KWin plugin interface
|
||||
/////////////////////////////////
|
||||
|
@ -803,12 +806,12 @@ extern "C"
|
|||
{
|
||||
Client *allocate(Workspace *ws, WId w, int)
|
||||
{
|
||||
return(new QuartzClient(ws, w));
|
||||
return(new Quartz::QuartzClient(ws, w));
|
||||
}
|
||||
|
||||
void init()
|
||||
{
|
||||
clientHandler = new QuartzHandler();
|
||||
Quartz::clientHandler = new Quartz::QuartzHandler();
|
||||
}
|
||||
|
||||
void reset()
|
||||
|
@ -818,7 +821,7 @@ extern "C"
|
|||
|
||||
void deinit()
|
||||
{
|
||||
delete clientHandler;
|
||||
delete Quartz::clientHandler;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,8 +26,9 @@
|
|||
class QSpacerItem;
|
||||
class QBoxLayout;
|
||||
|
||||
namespace KWinInternal {
|
||||
namespace Quartz {
|
||||
|
||||
using namespace KWinInternal;
|
||||
|
||||
class QuartzHandler: public QObject
|
||||
{
|
||||
|
@ -47,7 +48,7 @@ class QuartzHandler: public QObject
|
|||
};
|
||||
|
||||
|
||||
class QuartzButton : public KWinInternal::KWinButton
|
||||
class QuartzButton : public KWinButton
|
||||
{
|
||||
public:
|
||||
QuartzButton(Client *parent=0, const char *name=0, bool largeButton=true,
|
||||
|
@ -73,7 +74,7 @@ class QuartzButton : public KWinInternal::KWinButton
|
|||
};
|
||||
|
||||
|
||||
class QuartzClient : public KWinInternal::Client
|
||||
class QuartzClient : public Client
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
using namespace KWinInternal;
|
||||
|
||||
namespace Redmond {
|
||||
|
||||
static const char *kdelogo[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
|
@ -760,28 +761,30 @@ void GalliumClient::menuButtonPressed()
|
|||
button[BtnMenu]->setDown(false);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
extern "C"
|
||||
{
|
||||
Client *allocate(Workspace *ws, WId w, int)
|
||||
{
|
||||
return(new GalliumClient(ws, w));
|
||||
return(new Redmond::GalliumClient(ws, w));
|
||||
}
|
||||
|
||||
void init()
|
||||
{
|
||||
create_pixmaps();
|
||||
Redmond::create_pixmaps();
|
||||
}
|
||||
|
||||
void reset()
|
||||
{
|
||||
delete_pixmaps();
|
||||
create_pixmaps();
|
||||
Redmond::delete_pixmaps();
|
||||
Redmond::create_pixmaps();
|
||||
Workspace::self()->slotResetAllClientsDelayed();
|
||||
}
|
||||
|
||||
void deinit()
|
||||
{
|
||||
delete_pixmaps();
|
||||
Redmond::delete_pixmaps();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,9 +26,11 @@ class QLabel;
|
|||
class QSpacerItem;
|
||||
class QBoxLayout;
|
||||
|
||||
namespace KWinInternal {
|
||||
namespace Redmond {
|
||||
|
||||
class GalliumButton : public KWinInternal::KWinButton
|
||||
using namespace KWinInternal;
|
||||
|
||||
class GalliumButton : public KWinButton
|
||||
{
|
||||
public:
|
||||
GalliumButton(Client *parent=0, const char *name=0,
|
||||
|
@ -56,7 +58,7 @@ class GalliumButton : public KWinInternal::KWinButton
|
|||
};
|
||||
|
||||
|
||||
class GalliumClient : public KWinInternal::Client
|
||||
class GalliumClient : public Client
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
using namespace KWinInternal;
|
||||
|
||||
namespace System {
|
||||
|
||||
static unsigned char iconify_bits[] = {
|
||||
0x00, 0x00, 0xff, 0xff, 0x7e, 0x3c, 0x18, 0x00};
|
||||
|
@ -536,26 +537,28 @@ void SystemClient::activeChange(bool)
|
|||
button[4]->reset();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
extern "C"
|
||||
{
|
||||
Client *allocate(Workspace *ws, WId w, int)
|
||||
{
|
||||
return(new SystemClient(ws, w));
|
||||
return(new System::SystemClient(ws, w));
|
||||
}
|
||||
void init()
|
||||
{
|
||||
create_pixmaps();
|
||||
System::create_pixmaps();
|
||||
}
|
||||
void reset()
|
||||
{
|
||||
delete_pixmaps();
|
||||
create_pixmaps();
|
||||
System::delete_pixmaps();
|
||||
System::create_pixmaps();
|
||||
// Ensure changes in tooltip state get applied
|
||||
Workspace::self()->slotResetAllClientsDelayed();
|
||||
}
|
||||
void deinit()
|
||||
{
|
||||
delete_pixmaps();
|
||||
System::delete_pixmaps();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -11,9 +11,11 @@
|
|||
class QLabel;
|
||||
class QSpacerItem;
|
||||
|
||||
namespace KWinInternal {
|
||||
namespace System {
|
||||
|
||||
class SystemButton : public KWinInternal::KWinButton
|
||||
using namespace KWinInternal;
|
||||
|
||||
class SystemButton : public KWinButton
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -40,7 +42,7 @@ private:
|
|||
Client* client;
|
||||
};
|
||||
|
||||
class SystemClient : public KWinInternal::Client
|
||||
class SystemClient : public Client
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
|
|
@ -50,7 +50,7 @@ extern "C"
|
|||
{
|
||||
Client * allocate(Workspace * ws, WId w, int tool)
|
||||
{
|
||||
return new Web(ws, w, tool != 0);
|
||||
return new Web::WebClient(ws, w, tool != 0);
|
||||
}
|
||||
|
||||
void init()
|
||||
|
@ -70,7 +70,9 @@ extern "C"
|
|||
}
|
||||
}
|
||||
|
||||
Web::Web(Workspace * ws, WId w, bool tool, QWidget * parent, const char * name)
|
||||
namespace Web {
|
||||
|
||||
WebClient::WebClient(Workspace * ws, WId w, bool tool, QWidget * parent, const char * name)
|
||||
: Client (ws, w, parent, name, WResizeNoErase),
|
||||
tool_ (tool),
|
||||
mainLayout_ (0),
|
||||
|
@ -86,13 +88,13 @@ Web::Web(Workspace * ws, WId w, bool tool, QWidget * parent, const char * name)
|
|||
connect(options, SIGNAL(resetClients()), this, SLOT(slotReset()));
|
||||
}
|
||||
|
||||
Web::~Web()
|
||||
WebClient::~WebClient()
|
||||
{
|
||||
// Empty.
|
||||
}
|
||||
|
||||
void
|
||||
Web::resizeEvent(QResizeEvent * e)
|
||||
WebClient::resizeEvent(QResizeEvent * e)
|
||||
{
|
||||
Client::resizeEvent(e);
|
||||
doShape();
|
||||
|
@ -100,13 +102,13 @@ Web::resizeEvent(QResizeEvent * e)
|
|||
}
|
||||
|
||||
void
|
||||
Web::captionChange(const QString &)
|
||||
WebClient::captionChange(const QString &)
|
||||
{
|
||||
repaint();
|
||||
}
|
||||
|
||||
void
|
||||
Web::paintEvent(QPaintEvent * pe)
|
||||
WebClient::paintEvent(QPaintEvent * pe)
|
||||
{
|
||||
QRect titleRect(titleSpacer_->geometry());
|
||||
titleRect.setTop(1);
|
||||
|
@ -170,7 +172,7 @@ Web::paintEvent(QPaintEvent * pe)
|
|||
}
|
||||
|
||||
void
|
||||
Web::doShape()
|
||||
WebClient::doShape()
|
||||
{
|
||||
if (!shape_)
|
||||
return;
|
||||
|
@ -212,21 +214,21 @@ Web::doShape()
|
|||
}
|
||||
|
||||
void
|
||||
Web::showEvent(QShowEvent *)
|
||||
WebClient::showEvent(QShowEvent *)
|
||||
{
|
||||
doShape();
|
||||
repaint();
|
||||
}
|
||||
|
||||
void
|
||||
Web::windowWrapperShowEvent(QShowEvent *)
|
||||
WebClient::windowWrapperShowEvent(QShowEvent *)
|
||||
{
|
||||
doShape();
|
||||
repaint();
|
||||
}
|
||||
|
||||
void
|
||||
Web::mouseDoubleClickEvent(QMouseEvent * e)
|
||||
WebClient::mouseDoubleClickEvent(QMouseEvent * e)
|
||||
{
|
||||
if (titleSpacer_->geometry().contains(e->pos()))
|
||||
{
|
||||
|
@ -236,25 +238,25 @@ Web::mouseDoubleClickEvent(QMouseEvent * e)
|
|||
}
|
||||
|
||||
void
|
||||
Web::stickyChange(bool b)
|
||||
WebClient::stickyChange(bool b)
|
||||
{
|
||||
emit(stkyChange(b));
|
||||
}
|
||||
|
||||
void
|
||||
Web::maximizeChange(bool b)
|
||||
WebClient::maximizeChange(bool b)
|
||||
{
|
||||
emit(maxChange(b));
|
||||
}
|
||||
|
||||
void
|
||||
Web::activeChange(bool)
|
||||
WebClient::activeChange(bool)
|
||||
{
|
||||
repaint();
|
||||
}
|
||||
|
||||
Client::MousePosition
|
||||
Web::mousePosition(const QPoint & p) const
|
||||
WebClient::mousePosition(const QPoint & p) const
|
||||
{
|
||||
int x = p.x();
|
||||
int y = p.y();
|
||||
|
@ -296,14 +298,14 @@ Web::mousePosition(const QPoint & p) const
|
|||
}
|
||||
|
||||
void
|
||||
Web::slotReset()
|
||||
WebClient::slotReset()
|
||||
{
|
||||
_resetLayout();
|
||||
repaint();
|
||||
}
|
||||
|
||||
void
|
||||
Web::slotMaximize(int button)
|
||||
WebClient::slotMaximize(int button)
|
||||
{
|
||||
switch (button)
|
||||
{
|
||||
|
@ -322,7 +324,7 @@ Web::slotMaximize(int button)
|
|||
}
|
||||
|
||||
WebButton *
|
||||
Web::_createButton(const QString & s, QWidget * parent)
|
||||
WebClient::_createButton(const QString & s, QWidget * parent)
|
||||
{
|
||||
WebButton * b = 0;
|
||||
|
||||
|
@ -373,7 +375,7 @@ Web::_createButton(const QString & s, QWidget * parent)
|
|||
}
|
||||
|
||||
void
|
||||
Web::_createButtons()
|
||||
WebClient::_createButtons()
|
||||
{
|
||||
leftButtonList_ .clear();
|
||||
rightButtonList_ .clear();
|
||||
|
@ -421,7 +423,7 @@ Web::_createButtons()
|
|||
}
|
||||
|
||||
void
|
||||
Web::_resetLayout()
|
||||
WebClient::_resetLayout()
|
||||
{
|
||||
KConfig c(locate("config", "kwinwebrc"));
|
||||
c.setGroup("General");
|
||||
|
@ -501,10 +503,12 @@ Web::_resetLayout()
|
|||
}
|
||||
|
||||
void
|
||||
Web::animateIconifyOrDeiconify(bool /* iconify */)
|
||||
WebClient::animateIconifyOrDeiconify(bool /* iconify */)
|
||||
{
|
||||
// Nice and simple ;)
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#include "Web.moc"
|
||||
// vim:ts=2:sw=2:tw=78:set et:
|
||||
|
|
|
@ -30,17 +30,19 @@ class QLabel;
|
|||
class QSpacerItem;
|
||||
class QBoxLayout;
|
||||
|
||||
namespace KWinInternal
|
||||
namespace Web
|
||||
{
|
||||
using namespace KWinInternal;
|
||||
|
||||
class WebButton;
|
||||
|
||||
class Web : public KWinInternal::Client
|
||||
class WebClient : public Client
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
Web
|
||||
WebClient
|
||||
(
|
||||
Workspace *,
|
||||
WId,
|
||||
|
@ -49,7 +51,7 @@ namespace KWinInternal
|
|||
const char * name = 0
|
||||
);
|
||||
|
||||
~Web();
|
||||
~WebClient();
|
||||
|
||||
protected:
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
|
||||
#include "WebButton.h"
|
||||
|
||||
namespace Web {
|
||||
|
||||
using namespace KWinInternal;
|
||||
|
||||
WebButton::WebButton(QWidget * parent, const QString& tip)
|
||||
|
@ -250,5 +252,7 @@ WebButton::resizeEvent(QResizeEvent *)
|
|||
repaint();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#include "WebButton.moc"
|
||||
// vim:ts=2:sw=2:tw=78:set et:
|
||||
|
|
|
@ -27,9 +27,11 @@
|
|||
#include <klocale.h>
|
||||
#include "../../kwinbutton.h"
|
||||
|
||||
namespace KWinInternal
|
||||
namespace Web
|
||||
{
|
||||
class WebButton : public KWinInternal::KWinWidgetButton
|
||||
using namespace KWinInternal;
|
||||
|
||||
class WebButton : public KWinWidgetButton
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
|
||||
#include "WebButtonClose.h"
|
||||
|
||||
namespace Web {
|
||||
|
||||
using namespace KWinInternal;
|
||||
|
||||
static unsigned char close_bits[] =
|
||||
|
@ -42,5 +44,7 @@ WebButtonClose::clickEvent(int /* button */)
|
|||
emit(closeWindow());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#include "WebButtonClose.moc"
|
||||
// vim:ts=2:sw=2:tw=78:set et:
|
||||
|
|
|
@ -24,8 +24,10 @@
|
|||
|
||||
#include "WebButton.h"
|
||||
|
||||
namespace KWinInternal
|
||||
namespace Web
|
||||
{
|
||||
using namespace KWinInternal;
|
||||
|
||||
class WebButtonClose : public WebButton
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
|
||||
#include "WebButtonHelp.h"
|
||||
|
||||
|
||||
namespace Web {
|
||||
|
||||
using namespace KWinInternal;
|
||||
|
||||
static unsigned char help_bits[] =
|
||||
|
@ -42,5 +45,7 @@ WebButtonHelp::clickEvent(int /* button */)
|
|||
emit(help());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#include "WebButtonHelp.moc"
|
||||
// vim:ts=2:sw=2:tw=78:set et:
|
||||
|
|
|
@ -24,8 +24,10 @@
|
|||
|
||||
#include "WebButton.h"
|
||||
|
||||
namespace KWinInternal
|
||||
namespace Web
|
||||
{
|
||||
using namespace KWinInternal;
|
||||
|
||||
class WebButtonHelp : public WebButton
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
|
||||
#include "WebButtonIconify.h"
|
||||
|
||||
namespace Web {
|
||||
|
||||
using namespace KWinInternal;
|
||||
|
||||
static unsigned char iconify_bits[] =
|
||||
|
@ -42,5 +44,7 @@ WebButtonIconify::clickEvent(int /* button */)
|
|||
emit(iconify());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#include "WebButtonIconify.moc"
|
||||
// vim:ts=2:sw=2:tw=78:set et:
|
||||
|
|
|
@ -24,8 +24,10 @@
|
|||
|
||||
#include "WebButton.h"
|
||||
|
||||
namespace KWinInternal
|
||||
namespace Web
|
||||
{
|
||||
using namespace KWinInternal;
|
||||
|
||||
class WebButtonIconify : public WebButton
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
|
||||
#include "WebButtonLower.h"
|
||||
|
||||
namespace Web {
|
||||
|
||||
using namespace KWinInternal;
|
||||
|
||||
static unsigned char lower_bits[] =
|
||||
|
@ -42,5 +44,7 @@ WebButtonLower::clickEvent(int /* button */)
|
|||
emit(lowerWindow());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#include "WebButtonLower.moc"
|
||||
// vim:ts=2:sw=2:tw=78:set et:
|
||||
|
|
|
@ -24,8 +24,10 @@
|
|||
|
||||
#include "WebButton.h"
|
||||
|
||||
namespace KWinInternal
|
||||
namespace Web
|
||||
{
|
||||
using namespace KWinInternal;
|
||||
|
||||
class WebButtonLower : public WebButton
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
|
||||
#include "WebButtonMaximize.h"
|
||||
|
||||
namespace Web {
|
||||
|
||||
using namespace KWinInternal;
|
||||
|
||||
static unsigned char maximize_bits[] =
|
||||
|
@ -56,5 +58,7 @@ WebButtonMaximize::clickEvent(int button)
|
|||
emit(maximize(button));
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#include "WebButtonMaximize.moc"
|
||||
// vim:ts=2:sw=2:tw=78:set et:
|
||||
|
|
|
@ -24,8 +24,9 @@
|
|||
|
||||
#include "WebButton.h"
|
||||
|
||||
namespace KWinInternal
|
||||
namespace Web
|
||||
{
|
||||
using namespace KWinInternal;
|
||||
|
||||
class WebButtonMaximize : public WebButton
|
||||
{
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
|
||||
#include "WebButtonSticky.h"
|
||||
|
||||
namespace Web {
|
||||
|
||||
using namespace KWinInternal;
|
||||
|
||||
static unsigned char sticky_bits[] =
|
||||
|
@ -56,5 +58,7 @@ WebButtonSticky::clickEvent(int /* button */)
|
|||
emit(toggleSticky());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#include "WebButtonSticky.moc"
|
||||
// vim:ts=2:sw=2:tw=78:set et:
|
||||
|
|
|
@ -24,8 +24,10 @@
|
|||
|
||||
#include "WebButton.h"
|
||||
|
||||
namespace KWinInternal
|
||||
namespace Web
|
||||
{
|
||||
using namespace KWinInternal;
|
||||
|
||||
class WebButtonSticky : public WebButton
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
Loading…
Reference in a new issue