Merge KDecorationBridgeUnstable into KDecorationBridge

This commit is contained in:
Martin Gräßlin 2013-08-20 11:17:48 +02:00
parent a1641efdf1
commit c8331784ba
3 changed files with 16 additions and 28 deletions

View file

@ -28,7 +28,7 @@ namespace KWin
class Client;
class Bridge : public KDecorationBridgeUnstable
class Bridge : public KDecorationBridge
{
public:
explicit Bridge(Client* cl);

View file

@ -408,10 +408,7 @@ KDecoration::Position KDecoration::mousePosition(const QPoint& p) const
QRect KDecoration::transparentRect() const
{
if (KDecorationBridgeUnstable *bridge2 = dynamic_cast<KDecorationBridgeUnstable*>(bridge_))
return bridge2->transparentRect();
else
return QRect();
return bridge_->transparentRect();
}
void KDecoration::setAlphaEnabled(bool enabled)
@ -431,7 +428,6 @@ bool KDecoration::isAlphaEnabled() const
KDecorationUnstable::KDecorationUnstable(KDecorationBridge* bridge, KDecorationFactory* factory)
: KDecoration(bridge, factory)
{
Q_ASSERT(dynamic_cast< KDecorationBridgeUnstable* >(bridge));
}
KDecorationUnstable::~KDecorationUnstable()
@ -440,7 +436,7 @@ KDecorationUnstable::~KDecorationUnstable()
bool KDecorationUnstable::compositingActive() const
{
return static_cast< KDecorationBridgeUnstable* >(bridge_)->compositingActive();
return bridge_->compositingActive();
}
void KDecorationUnstable::padding(int &left, int &right, int &top, int &bottom) const
@ -452,69 +448,69 @@ void KDecorationUnstable::padding(int &left, int &right, int &top, int &bottom)
int KDecorationUnstable::tabCount() const
{
return static_cast< KDecorationBridgeUnstable* >(bridge_)->tabCount();
return bridge_->tabCount();
}
long KDecorationUnstable::tabId(int idx) const
{
return static_cast< KDecorationBridgeUnstable* >(bridge_)->tabId(idx);
return bridge_->tabId(idx);
}
QString KDecorationUnstable::caption(int idx) const
{
return static_cast< KDecorationBridgeUnstable* >(bridge_)->caption(idx);
return bridge_->caption(idx);
}
QIcon KDecorationUnstable::icon(int idx) const
{
return static_cast< KDecorationBridgeUnstable* >(bridge_)->icon(idx);
return bridge_->icon(idx);
}
long KDecorationUnstable::currentTabId() const
{
return static_cast< KDecorationBridgeUnstable* >(bridge_)->currentTabId();
return bridge_->currentTabId();
}
void KDecorationUnstable::setCurrentTab(long id)
{
static_cast< KDecorationBridgeUnstable* >(bridge_)->setCurrentTab(id);
bridge_->setCurrentTab(id);
}
void KDecorationUnstable::tab_A_before_B(long A, long B)
{
static_cast< KDecorationBridgeUnstable* >(bridge_)->tab_A_before_B(A, B);
bridge_->tab_A_before_B(A, B);
}
void KDecorationUnstable::tab_A_behind_B(long A, long B)
{
static_cast< KDecorationBridgeUnstable* >(bridge_)->tab_A_behind_B(A, B);
bridge_->tab_A_behind_B(A, B);
}
void KDecorationUnstable::untab(long id, const QRect& newGeom)
{
static_cast< KDecorationBridgeUnstable* >(bridge_)->untab(id, newGeom);
bridge_->untab(id, newGeom);
}
void KDecorationUnstable::closeTab(long id)
{
static_cast< KDecorationBridgeUnstable* >(bridge_)->closeTab(id);
bridge_->closeTab(id);
}
void KDecorationUnstable::closeTabGroup()
{
static_cast< KDecorationBridgeUnstable* >(bridge_)->closeTabGroup();
bridge_->closeTabGroup();
}
void KDecorationUnstable::showWindowMenu(const QPoint &pos, long id)
{
static_cast< KDecorationBridgeUnstable* >(bridge_)->showWindowMenu(pos, id);
bridge_->showWindowMenu(pos, id);
}
//END tabbing
KDecoration::WindowOperation KDecorationUnstable::buttonToWindowOperation(Qt::MouseButtons button)
{
return static_cast< KDecorationBridgeUnstable* >(bridge_)->buttonToWindowOperation(button);
return bridge_->buttonToWindowOperation(button);
}
QRegion KDecoration::region(KDecorationDefines::Region)

View file

@ -84,25 +84,17 @@ public:
virtual QWidget* initialParentWidget() const = 0;
virtual Qt::WindowFlags initialWFlags() const = 0;
virtual void grabXServer(bool grab) = 0;
};
class KDecorationBridgeUnstable
: public KDecorationBridge
{
public:
virtual bool compositingActive() const = 0;
virtual QRect transparentRect() const = 0;
// Window tabbing
using KDecorationBridge::caption;
virtual QString caption(int idx) const = 0;
virtual void closeTab(long id) = 0;
virtual void closeTabGroup() = 0;
virtual long currentTabId() const = 0;
using KDecorationBridge::icon;
virtual QIcon icon(int idx) const = 0;
virtual void setCurrentTab(long id) = 0;
using KDecorationBridge::showWindowMenu;
virtual void showWindowMenu(const QPoint& pos, long id) = 0;
virtual void tab_A_before_B(long A, long B) = 0;
virtual void tab_A_behind_B(long A, long B) = 0;