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
icc-effect-5.14.5
Arthur Arlt 2011-06-24 16:20:40 +02:00
parent 2f11337d98
commit 76e5f0e08b
2 changed files with 14 additions and 0 deletions

View File

@ -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

View File

@ -29,6 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef KWIN_SCREENEDGE_H
#define KWIN_SCREENEDGE_H
#include <QtCore/QObject>
#include <QtCore/QVector>
#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: