From a90072d75303ceb7b4e75764ae113d0dfd2e272b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 20 Aug 2013 11:58:02 +0200 Subject: [PATCH] Merge KDecorationUnstable into KDecoration Also KCommonDecorationUnstable is merged into KCommonDecoration. --- client.cpp | 6 +- clients/aurorae/src/aurorae.cpp | 16 +-- clients/aurorae/src/aurorae.h | 2 +- clients/oxygen/oxygenclient.cpp | 18 +-- clients/oxygen/oxygenclient.h | 2 +- events.cpp | 6 +- libkdecorations/kcommondecoration.cpp | 72 ++++------ libkdecorations/kcommondecoration.h | 47 +++--- libkdecorations/kcommondecoration_p.cpp | 2 +- libkdecorations/kcommondecoration_p.h | 2 +- libkdecorations/kdecoration.cpp | 39 ++--- libkdecorations/kdecoration.h | 183 +++++++++++------------- 12 files changed, 169 insertions(+), 226 deletions(-) diff --git a/client.cpp b/client.cpp index 7f8143bc59..a52bfcbd29 100644 --- a/client.cpp +++ b/client.cpp @@ -449,8 +449,7 @@ void Client::createDecoration(const QRect& oldgeom) decoration->widget()->lower(); decoration->borders(border_left, border_right, border_top, border_bottom); padding_left = padding_right = padding_top = padding_bottom = 0; - if (KDecorationUnstable *deco2 = dynamic_cast(decoration)) - deco2->padding(padding_left, padding_right, padding_top, padding_bottom); + decoration->padding(padding_left, padding_right, padding_top, padding_bottom); Xcb::moveWindow(decoration->widget()->winId(), -padding_left, -padding_top); move(calculateGravitation(false)); plainResize(sizeForClientSize(clientSize()), ForceGeometrySet); @@ -488,8 +487,7 @@ bool Client::checkBorderSizes(bool also_resize) return false; int new_left = 0, new_right = 0, new_top = 0, new_bottom = 0; - if (KDecorationUnstable *deco2 = dynamic_cast(decoration)) - deco2->padding(new_left, new_right, new_top, new_bottom); + decoration->padding(new_left, new_right, new_top, new_bottom); if (padding_left != new_left || padding_top != new_top) Xcb::moveWindow(decoration->widget()->winId(), -new_left, -new_top); padding_left = new_left; diff --git a/clients/aurorae/src/aurorae.cpp b/clients/aurorae/src/aurorae.cpp index 9a0c707d38..b7dc633564 100644 --- a/clients/aurorae/src/aurorae.cpp +++ b/clients/aurorae/src/aurorae.cpp @@ -238,7 +238,7 @@ AuroraeFactory *AuroraeFactory::s_instance = NULL; * Client *******************************************************/ AuroraeClient::AuroraeClient(KDecorationBridge *bridge, KDecorationFactory *factory) - : KDecorationUnstable(bridge, factory) + : KDecoration(bridge, factory) , m_view(NULL) , m_scene(new QGraphicsScene(this)) , m_item(AuroraeFactory::instance()->createQmlDecoration(this)) @@ -305,7 +305,7 @@ bool AuroraeClient::eventFilter(QObject *object, QEvent *event) // TODO: remove in KDE5 // see BUG: 304248 if (object != widget() || event->type() != QEvent::Wheel) { - return KDecorationUnstable::eventFilter(object, event); + return KDecoration::eventFilter(object, event); } QWheelEvent *wheel = static_cast(event); if (mousePosition(wheel->pos()) == PositionCenter) { @@ -548,12 +548,12 @@ int AuroraeClient::doubleClickInterval() const void AuroraeClient::closeWindow() { - QMetaObject::invokeMethod(qobject_cast< KDecorationUnstable* >(this), "doCloseWindow", Qt::QueuedConnection); + QMetaObject::invokeMethod(qobject_cast< KDecoration* >(this), "doCloseWindow", Qt::QueuedConnection); } void AuroraeClient::doCloseWindow() { - KDecorationUnstable::closeWindow(); + KDecoration::closeWindow(); } void AuroraeClient::maximize(int button) @@ -561,7 +561,7 @@ void AuroraeClient::maximize(int button) // a maximized window does not need to have a window decoration // in that case we need to delay handling by one cycle // BUG: 304870 - QMetaObject::invokeMethod(qobject_cast< KDecorationUnstable* >(this), + QMetaObject::invokeMethod(qobject_cast< KDecoration* >(this), "doMaximzie", Qt::QueuedConnection, Q_ARG(int, button)); @@ -569,19 +569,19 @@ void AuroraeClient::maximize(int button) void AuroraeClient::doMaximzie(int button) { - KDecorationUnstable::maximize(static_cast(button)); + KDecoration::maximize(static_cast(button)); } void AuroraeClient::titlebarDblClickOperation() { // the double click operation can result in a window being maximized // see maximize - QMetaObject::invokeMethod(qobject_cast< KDecorationUnstable* >(this), "doTitlebarDblClickOperation", Qt::QueuedConnection); + QMetaObject::invokeMethod(qobject_cast< KDecoration* >(this), "doTitlebarDblClickOperation", Qt::QueuedConnection); } void AuroraeClient::doTitlebarDblClickOperation() { - KDecorationUnstable::titlebarDblClickOperation(); + KDecoration::titlebarDblClickOperation(); } QVariant AuroraeClient::readConfig(const QString &key, const QVariant &defaultValue) diff --git a/clients/aurorae/src/aurorae.h b/clients/aurorae/src/aurorae.h index f11f4c9c97..0b0899a1b7 100644 --- a/clients/aurorae/src/aurorae.h +++ b/clients/aurorae/src/aurorae.h @@ -82,7 +82,7 @@ private: QString m_themeName; }; -class AuroraeClient : public KDecorationUnstable +class AuroraeClient : public KDecoration { Q_OBJECT Q_PROPERTY(bool active READ isActive NOTIFY activeChanged) diff --git a/clients/oxygen/oxygenclient.cpp b/clients/oxygen/oxygenclient.cpp index 23f95aa3d6..797d827066 100644 --- a/clients/oxygen/oxygenclient.cpp +++ b/clients/oxygen/oxygenclient.cpp @@ -55,7 +55,7 @@ namespace Oxygen //___________________________________________ Client::Client(KDecorationBridge *b, Factory *f): - KCommonDecorationUnstable(b, f), + KCommonDecoration(b, f), _factory( f ), _sizeGrip( 0 ), _glowAnimation( new Animation( 200, this ) ), @@ -140,7 +140,7 @@ namespace Oxygen //___________________________________________ void Client::reset( unsigned long changed ) { - KCommonDecorationUnstable::reset( changed ); + KCommonDecoration::reset( changed ); // update window mask when compositing is changed if( !_initialized ) return; @@ -1240,7 +1240,7 @@ namespace Oxygen void Client::activeChange( void ) { - KCommonDecorationUnstable::activeChange(); + KCommonDecoration::activeChange(); _itemData.setDirty( true ); // reset animation @@ -1266,21 +1266,21 @@ namespace Oxygen { if( hasSizeGrip() ) sizeGrip().setVisible( !( isShade() || isMaximized() ) ); setAlphaEnabled(!isMaximized()); - KCommonDecorationUnstable::maximizeChange(); + KCommonDecoration::maximizeChange(); } //_________________________________________________________ void Client::shadeChange( void ) { if( hasSizeGrip() ) sizeGrip().setVisible( !( isShade() || isMaximized() ) ); - KCommonDecorationUnstable::shadeChange(); + KCommonDecoration::shadeChange(); } //_________________________________________________________ void Client::captionChange( void ) { - KCommonDecorationUnstable::captionChange(); + KCommonDecoration::captionChange(); _itemData.setDirty( true ); if( titleAnimationsEnabled() ) { _titleAnimationData->setDirty( true ); } @@ -1401,7 +1401,7 @@ namespace Oxygen default: break; } - return state || KCommonDecorationUnstable::eventFilter( object, event ); + return state || KCommonDecoration::eventFilter( object, event ); } @@ -1421,7 +1421,7 @@ namespace Oxygen { _pixmap = QPixmap( event->size() ); } // base class implementation - KCommonDecorationUnstable::resizeEvent( event ); + KCommonDecoration::resizeEvent( event ); } //_________________________________________________________ @@ -1901,7 +1901,7 @@ namespace Oxygen { if( event->timerId() != _dragStartTimer.timerId() ) - { return KCommonDecorationUnstable::timerEvent( event ); } + { return KCommonDecoration::timerEvent( event ); } _dragStartTimer.stop(); diff --git a/clients/oxygen/oxygenclient.h b/clients/oxygen/oxygenclient.h index 2a74539de7..11bdd1152d 100644 --- a/clients/oxygen/oxygenclient.h +++ b/clients/oxygen/oxygenclient.h @@ -47,7 +47,7 @@ namespace Oxygen { class SizeGrip; - class Client : public KCommonDecorationUnstable + class Client : public KCommonDecoration { Q_OBJECT diff --git a/events.cpp b/events.cpp index cdb577ad50..55be799f89 100644 --- a/events.cpp +++ b/events.cpp @@ -1120,10 +1120,8 @@ bool Client::buttonPressEvent(xcb_window_t w, int button, int state, int x, int return processDecorationButtonPress(button, state, x, y, x_root, y_root, true); } if (w == decorationId()) { - if (dynamic_cast(decoration)) - // New API processes core events FIRST and only passes unused ones to the decoration - return processDecorationButtonPress(button, state, x, y, x_root, y_root, true); - return false; + // New API processes core events FIRST and only passes unused ones to the decoration + return processDecorationButtonPress(button, state, x, y, x_root, y_root, true); } if (w == frameId()) processDecorationButtonPress(button, state, x, y, x_root, y_root); diff --git a/libkdecorations/kcommondecoration.cpp b/libkdecorations/kcommondecoration.cpp index 7857bc3ca3..20fc9a7cf4 100644 --- a/libkdecorations/kcommondecoration.cpp +++ b/libkdecorations/kcommondecoration.cpp @@ -1354,93 +1354,77 @@ KDecoration* KCommonDecoration::decoration() return wrapper; } - -KCommonDecorationUnstable::KCommonDecorationUnstable(KDecorationBridge* bridge, KDecorationFactory* factory) - : KCommonDecoration(bridge, factory) -{ - Q_ASSERT(dynamic_cast(decoration())); -} - -KCommonDecorationUnstable::~KCommonDecorationUnstable() -{ -} - // All copied from kdecoration.cpp -bool KCommonDecorationUnstable::compositingActive() const +bool KCommonDecoration::compositingActive() const { - return static_cast(decoration())->compositingActive(); + return decoration()->compositingActive(); } // Window tabbing -int KCommonDecorationUnstable::tabCount() const +int KCommonDecoration::tabCount() const { - return static_cast(decoration())->tabCount(); + return decoration()->tabCount(); } -QString KCommonDecorationUnstable::caption(int idx) const +QString KCommonDecoration::caption(int idx) const { - return static_cast(decoration())->caption(idx); + return decoration()->caption(idx); } -QIcon KCommonDecorationUnstable::icon(int idx) const +QIcon KCommonDecoration::icon(int idx) const { - return static_cast(decoration())->icon(idx); + return decoration()->icon(idx); } -long KCommonDecorationUnstable::tabId(int idx) const +long KCommonDecoration::tabId(int idx) const { - return static_cast(decoration())->tabId(idx); + return decoration()->tabId(idx); } -long KCommonDecorationUnstable::currentTabId() const +long KCommonDecoration::currentTabId() const { - return static_cast(decoration())->currentTabId(); + return decoration()->currentTabId(); } -void KCommonDecorationUnstable::setCurrentTab(long id) +void KCommonDecoration::setCurrentTab(long id) { - static_cast(decoration())->setCurrentTab(id); + decoration()->setCurrentTab(id); } -void KCommonDecorationUnstable::tab_A_before_B(long A, long B) +void KCommonDecoration::tab_A_before_B(long A, long B) { - static_cast(decoration())->tab_A_before_B(A, B); + decoration()->tab_A_before_B(A, B); } -void KCommonDecorationUnstable::tab_A_behind_B(long A, long B) +void KCommonDecoration::tab_A_behind_B(long A, long B) { - static_cast(decoration())->tab_A_behind_B(A, B); + decoration()->tab_A_behind_B(A, B); } -void KCommonDecorationUnstable::untab(long id, const QRect& newGeom) +void KCommonDecoration::untab(long id, const QRect& newGeom) { - static_cast(decoration())->untab(id, newGeom); + decoration()->untab(id, newGeom); } -void KCommonDecorationUnstable::closeTab(long id) +void KCommonDecoration::closeTab(long id) { - static_cast(decoration())->closeTab(id); + decoration()->closeTab(id); } -void KCommonDecorationUnstable::closeTabGroup() +void KCommonDecoration::closeTabGroup() { - static_cast(decoration())->closeTabGroup(); + decoration()->closeTabGroup(); } -void KCommonDecorationUnstable::showWindowMenu(const QPoint &pos, long id) +void KCommonDecoration::showWindowMenu(const QPoint &pos, long id) { - static_cast(decoration())->showWindowMenu(pos, id); + decoration()->showWindowMenu(pos, id); } -KDecoration::WindowOperation KCommonDecorationUnstable::buttonToWindowOperation(Qt::MouseButtons button) +KDecoration::WindowOperation KCommonDecoration::buttonToWindowOperation(Qt::MouseButtons button) { - return static_cast(decoration())->buttonToWindowOperation(button); -} - -bool KCommonDecorationUnstable::eventFilter(QObject* o, QEvent* e) -{ - return KCommonDecoration::eventFilter(o, e); + return decoration()->buttonToWindowOperation(button); } // kate: space-indent on; indent-width 4; mixedindent off; indent-mode cstyle; diff --git a/libkdecorations/kcommondecoration.h b/libkdecorations/kcommondecoration.h index b19a41f366..3992e5dcb6 100644 --- a/libkdecorations/kcommondecoration.h +++ b/libkdecorations/kcommondecoration.h @@ -324,6 +324,25 @@ public: int width() const; // convenience int height() const; // convenience void processMousePressEvent(QMouseEvent* e); + + bool compositingActive() const; + + // Window tabbing + QString caption(int idx) const; + void closeTab(long id); + void closeTabGroup(); + long currentTabId() const; + QIcon icon(int idx) const; + void setCurrentTab(long id); + void showWindowMenu(const QPoint &, long id); + void tab_A_before_B(long A, long B); + void tab_A_behind_B(long A, long B); + int tabCount() const; + long tabId(int idx) const; + void untab(long id, const QRect& newGeom); + + WindowOperation buttonToWindowOperation(Qt::MouseButtons button); + Q_SIGNALS: void keepAboveChanged(bool); void keepBelowChanged(bool); @@ -416,34 +435,6 @@ private: KCommonDecorationPrivate *d; }; -class KWIN_EXPORT KCommonDecorationUnstable - : public KCommonDecoration -{ - Q_OBJECT -public: - KCommonDecorationUnstable(KDecorationBridge* bridge, KDecorationFactory* factory); - virtual ~KCommonDecorationUnstable(); - bool compositingActive() const; - - // Window tabbing - using KCommonDecoration::caption; - QString caption(int idx) const; - void closeTab(long id); - void closeTabGroup(); - long currentTabId() const; - QIcon icon(int idx = 0) const; - void setCurrentTab(long id); - void showWindowMenu(const QPoint &, long id); - void tab_A_before_B(long A, long B); - void tab_A_behind_B(long A, long B); - int tabCount() const; - long tabId(int idx) const; - void untab(long id, const QRect& newGeom); - - WindowOperation buttonToWindowOperation(Qt::MouseButtons button); - virtual bool eventFilter(QObject* o, QEvent* e); -}; - /** * Title bar buttons of KCommonDecoration need to inherit this class. */ diff --git a/libkdecorations/kcommondecoration_p.cpp b/libkdecorations/kcommondecoration_p.cpp index 584eaed2fb..66b74a5e9d 100644 --- a/libkdecorations/kcommondecoration_p.cpp +++ b/libkdecorations/kcommondecoration_p.cpp @@ -32,7 +32,7 @@ #include "kcommondecoration_p.moc" KCommonDecorationWrapper::KCommonDecorationWrapper(KCommonDecoration* deco, KDecorationBridge* bridge, KDecorationFactory* factory) - : KDecorationUnstable(bridge, factory) + : KDecoration(bridge, factory) , decoration(deco) { } diff --git a/libkdecorations/kcommondecoration_p.h b/libkdecorations/kcommondecoration_p.h index df4d4b398c..68662bd38e 100644 --- a/libkdecorations/kcommondecoration_p.h +++ b/libkdecorations/kcommondecoration_p.h @@ -38,7 +38,7 @@ class KDecorationFactory; // wrapper all functionality that needs reimplementing in KDecoration and forward it to KCommonDecoration class KCommonDecorationWrapper - : public KDecorationUnstable + : public KDecoration { Q_OBJECT public: diff --git a/libkdecorations/kdecoration.cpp b/libkdecorations/kdecoration.cpp index 4fb4ccb9bd..7c07798d04 100644 --- a/libkdecorations/kdecoration.cpp +++ b/libkdecorations/kdecoration.cpp @@ -420,90 +420,81 @@ bool KDecoration::isAlphaEnabled() const return d->alphaEnabled; } -KDecorationUnstable::KDecorationUnstable(KDecorationBridge* bridge, KDecorationFactory* factory) - : KDecoration(bridge, factory) -{ -} - -KDecorationUnstable::~KDecorationUnstable() -{ -} - -bool KDecorationUnstable::compositingActive() const +bool KDecoration::compositingActive() const { return bridge_->compositingActive(); } -void KDecorationUnstable::padding(int &left, int &right, int &top, int &bottom) const +void KDecoration::padding(int &left, int &right, int &top, int &bottom) const { left = right = top = bottom = 0; } //BEGIN Window tabbing -int KDecorationUnstable::tabCount() const +int KDecoration::tabCount() const { return bridge_->tabCount(); } -long KDecorationUnstable::tabId(int idx) const +long KDecoration::tabId(int idx) const { return bridge_->tabId(idx); } -QString KDecorationUnstable::caption(int idx) const +QString KDecoration::caption(int idx) const { return bridge_->caption(idx); } -QIcon KDecorationUnstable::icon(int idx) const +QIcon KDecoration::icon(int idx) const { return bridge_->icon(idx); } -long KDecorationUnstable::currentTabId() const +long KDecoration::currentTabId() const { return bridge_->currentTabId(); } -void KDecorationUnstable::setCurrentTab(long id) +void KDecoration::setCurrentTab(long id) { bridge_->setCurrentTab(id); } -void KDecorationUnstable::tab_A_before_B(long A, long B) +void KDecoration::tab_A_before_B(long A, long B) { bridge_->tab_A_before_B(A, B); } -void KDecorationUnstable::tab_A_behind_B(long A, long B) +void KDecoration::tab_A_behind_B(long A, long B) { bridge_->tab_A_behind_B(A, B); } -void KDecorationUnstable::untab(long id, const QRect& newGeom) +void KDecoration::untab(long id, const QRect& newGeom) { bridge_->untab(id, newGeom); } -void KDecorationUnstable::closeTab(long id) +void KDecoration::closeTab(long id) { bridge_->closeTab(id); } -void KDecorationUnstable::closeTabGroup() +void KDecoration::closeTabGroup() { bridge_->closeTabGroup(); } -void KDecorationUnstable::showWindowMenu(const QPoint &pos, long id) +void KDecoration::showWindowMenu(const QPoint &pos, long id) { bridge_->showWindowMenu(pos, id); } //END tabbing -KDecoration::WindowOperation KDecorationUnstable::buttonToWindowOperation(Qt::MouseButtons button) +KDecoration::WindowOperation KDecoration::buttonToWindowOperation(Qt::MouseButtons button) { return bridge_->buttonToWindowOperation(button); } diff --git a/libkdecorations/kdecoration.h b/libkdecorations/kdecoration.h index d208852cd0..29ee3ddd4c 100644 --- a/libkdecorations/kdecoration.h +++ b/libkdecorations/kdecoration.h @@ -822,6 +822,17 @@ public: * @param changed Specifies which settings were changed, given by the SettingXXX masks */ virtual void reset(unsigned long changed); + /** + * This function can return additional padding values that are added outside the + * borders of the window, and can be used by the decoration if it wants to paint + * outside the frame. + * + * The typical use case is for drawing a drop shadow or glowing effect around the window. + * + * The area outside the frame cannot receive input, and when compositing is disabled, + * painting is clipped to the mask, or the window frame if no mask is defined. + */ + virtual void padding(int &left, int &right, int &top, int &bottom) const; // special @@ -873,6 +884,77 @@ public: * Ungrabs X server (if the number of ungrab attempts matches the number of grab attempts). */ void ungrabXServer(); + /** + * Returns @a true if compositing--and therefore ARGB--is enabled. + */ + bool compositingActive() const; + /** + * Determine which action the user has mapped \p button to. Useful for determining whether + * a button press was for window tab dragging or for displaying the client menu. + */ + WindowOperation buttonToWindowOperation(Qt::MouseButtons button); + + + // Window tabbing + + /** + * Returns whether or not this client group contains the active client. + */ + bool isInActiveTabGroup(); + /** + * Return the amount of tabs in this group + */ + int tabCount() const; + + /** + * Return the icon for the tab at index \p idx (\p idx must be smaller than tabCount()) + */ + QIcon icon(int idx) const; + + /** + * Return the caption for the tab at index \p idx (\p idx must be smaller than tabCount()) + */ + QString caption(int idx) const; + + /** + * Return the unique id for the tab at index \p idx (\p idx must be smaller than tabCount()) + */ + long tabId(int idx) const; + /** + * Returns the id of the currently active client in this group. + */ + long currentTabId() const; + /** + * Activate tab for the window with the id \p id. + */ + void setCurrentTab(long id); + + /** + * Entab windw with id \p A beFORE the window with the id \p B. + */ + virtual void tab_A_before_B(long A, long B); + /** + * Entab windw with id \p A beHIND the window with the id \p B. + */ + virtual void tab_A_behind_B(long A, long B); + /** + * Remove the window with the id \p id from its tabgroup and place it at \p newGeom + */ + virtual void untab(long id, const QRect& newGeom); + + /** + * Close the client with the id \p id. + */ + void closeTab(long id); + /** + * Close all windows in this group. + */ + void closeTabGroup(); + /** + * Display the right-click client menu belonging to the client at index \p index at the + * global coordinates specified by \p pos. + */ + void showWindowMenu(const QPoint& pos, long id); public: // invokables; runtime resolution /** @@ -985,112 +1067,11 @@ private: QWidget* w_; KDecorationFactory* factory_; friend class KDecorationOptions; // for options_ - friend class KDecorationUnstable; // for bridge_ static KDecorationOptions* options_; KDecorationPrivate* d; }; -/** - * @warning THIS CLASS IS UNSTABLE! - */ -class KWIN_EXPORT KDecorationUnstable - : public KDecoration -{ - Q_OBJECT - -public: - KDecorationUnstable(KDecorationBridge* bridge, KDecorationFactory* factory); - virtual ~KDecorationUnstable(); - /** - * This function can return additional padding values that are added outside the - * borders of the window, and can be used by the decoration if it wants to paint - * outside the frame. - * - * The typical use case is for drawing a drop shadow or glowing effect around the window. - * - * The area outside the frame cannot receive input, and when compositing is disabled, - * painting is clipped to the mask, or the window frame if no mask is defined. - */ - virtual void padding(int &left, int &right, int &top, int &bottom) const; - /** - * Returns @a true if compositing--and therefore ARGB--is enabled. - */ - bool compositingActive() const; - - // Window tabbing - - /** - * Returns whether or not this client group contains the active client. - */ - bool isInActiveTabGroup(); - /** - * Return the amount of tabs in this group - */ - int tabCount() const; - - /** - * Return the icon for the tab at index \p idx (\p idx must be smaller than tabCount()) - */ - QIcon icon(int idx) const; - - /** - * Return the caption for the tab at index \p idx (\p idx must be smaller than tabCount()) - */ - QString caption(int idx) const; - - /** - * Return the unique id for the tab at index \p idx (\p idx must be smaller than tabCount()) - */ - long tabId(int idx) const; - /** - * Returns the id of the currently active client in this group. - */ - long currentTabId() const; - /** - * Activate tab for the window with the id \p id. - */ - void setCurrentTab(long id); - - /** - * Entab windw with id \p A beFORE the window with the id \p B. - */ - virtual void tab_A_before_B(long A, long B); - /** - * Entab windw with id \p A beHIND the window with the id \p B. - */ - virtual void tab_A_behind_B(long A, long B); - /** - * Remove the window with the id \p id from its tabgroup and place it at \p newGeom - */ - virtual void untab(long id, const QRect& newGeom); - - /** - * Close the client with the id \p id. - */ - void closeTab(long id); - /** - * Close all windows in this group. - */ - void closeTabGroup(); - /** - * Display the right-click client menu belonging to the client at index \p index at the - * global coordinates specified by \p pos. - */ - void showWindowMenu(const QPoint& pos, long id); - /** - * unshadow virtuals - */ - using KDecoration::caption; - using KDecoration::icon; - using KDecoration::showWindowMenu; - /** - * Determine which action the user has mapped \p button to. Useful for determining whether - * a button press was for window tab dragging or for displaying the client menu. - */ - WindowOperation buttonToWindowOperation(Qt::MouseButtons button); -}; - inline KDecorationDefines::MaximizeMode operator^(KDecorationDefines::MaximizeMode m1, KDecorationDefines::MaximizeMode m2) {