From 76e5f0e08b1d07254bfeac7f6b1b710150586d62 Mon Sep 17 00:00:00 2001 From: Arthur Arlt Date: Fri, 24 Jun 2011 16:20:40 +0200 Subject: [PATCH] Introduce new getter method screenEdgeWindows() to class ScreenEdge A new getter method screenEdgeWindows() is provided by class ScreenEdge since the screen edge windows are needed in class Workspace in the function propagateClients() which is implemented in layers.cpp --- screenedge.cpp | 12 ++++++++++++ screenedge.h | 2 ++ 2 files changed, 14 insertions(+) diff --git a/screenedge.cpp b/screenedge.cpp index c97e22405f..390d8a84b0 100644 --- a/screenedge.cpp +++ b/screenedge.cpp @@ -375,4 +375,16 @@ void ScreenEdge::raiseElectricBorderWindows() XRestackWindows(display(), windows, pos); delete [] windows; } + +QVector< Window* >* ScreenEdge::screenEdgeWindows() +{ + QVector< Window* >* screenEdgeWindows = new QVector< Window* >(); + for (int i = 0; i <= ELECTRIC_COUNT; ++i) { + if (electric_windows[i] != None) { + screenEdgeWindows->append((Window*)electric_windows[i]); + } + } + return screenEdgeWindows; +} } //namespace + diff --git a/screenedge.h b/screenedge.h index bc98b3e653..275c1fb95c 100644 --- a/screenedge.h +++ b/screenedge.h @@ -29,6 +29,7 @@ along with this program. If not, see . #ifndef KWIN_SCREENEDGE_H #define KWIN_SCREENEDGE_H #include +#include #include "kwinglobals.h" @@ -55,6 +56,7 @@ public: void raiseElectricBorderWindows(); void destroyElectricBorders(); bool electricBorderEvent(XEvent * e); + QVector< Window* >* screenEdgeWindows(); public Q_SLOTS: void updateElectricBorders(); private: