Commit a5b811da authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

Rename the variable where override-redirect windows are stored

Prepend m_ to unmanaged so no one has to come up with original names if
they want to iterate over a shadow copy of it.
parent ec73f5ee
......@@ -727,11 +727,11 @@ void Workspace::updateXStackingOrder()
std::unique_ptr<Xcb::Tree> tree{std::move(m_xStackingQueryTree)};
xcb_window_t *windows = tree->children();
const auto count = tree->data()->children_len;
int foundUnmanagedCount = unmanaged.count();
int foundUnmanagedCount = m_unmanaged.count();
for (unsigned int i = 0;
i < count;
++i) {
for (auto it = unmanaged.constBegin(); it != unmanaged.constEnd(); ++it) {
for (auto it = m_unmanaged.constBegin(); it != m_unmanaged.constEnd(); ++it) {
Unmanaged *u = *it;
if (u->window() == windows[i]) {
x_stacking.append(u);
......
......@@ -469,7 +469,7 @@ void Workspace::cleanupX11()
stacking_order.removeOne(client);
}
for (Unmanaged *overrideRedirect : unmanaged) {
for (Unmanaged *overrideRedirect : m_unmanaged) {
overrideRedirect->release(ReleaseReason::KWinShutsDown);
unconstrained_stacking_order.removeOne(overrideRedirect);
stacking_order.removeOne(overrideRedirect);
......@@ -616,7 +616,7 @@ void Workspace::addClient(X11Client *c)
void Workspace::addUnmanaged(Unmanaged* c)
{
unmanaged.append(c);
m_unmanaged.append(c);
markXStackingOrderAsDirty();
}
......@@ -667,8 +667,8 @@ void Workspace::removeClient(X11Client *c)
void Workspace::removeUnmanaged(Unmanaged* c)
{
Q_ASSERT(unmanaged.contains(c));
unmanaged.removeAll(c);
Q_ASSERT(m_unmanaged.contains(c));
m_unmanaged.removeAll(c);
emit unmanagedRemoved(c);
markXStackingOrderAsDirty();
}
......@@ -1680,7 +1680,7 @@ AbstractClient *Workspace::findAbstractClient(std::function<bool (const Abstract
Unmanaged *Workspace::findUnmanaged(std::function<bool (const Unmanaged*)> func) const
{
return Toplevel::findInList(unmanaged, func);
return Toplevel::findInList(m_unmanaged, func);
}
Unmanaged *Workspace::findUnmanaged(xcb_window_t w) const
......@@ -1718,7 +1718,7 @@ Toplevel *Workspace::findToplevel(std::function<bool (const Toplevel*)> func) co
if (auto *ret = Toplevel::findInList(m_allClients, func)) {
return ret;
}
if (Unmanaged *ret = Toplevel::findInList(unmanaged, func)) {
if (Unmanaged *ret = Toplevel::findInList(m_unmanaged, func)) {
return ret;
}
if (InternalClient *ret = Toplevel::findInList(m_internalClients, func)) {
......@@ -1738,7 +1738,7 @@ void Workspace::forEachToplevel(std::function<void (Toplevel *)> func)
{
std::for_each(m_allClients.constBegin(), m_allClients.constEnd(), func);
std::for_each(deleted.constBegin(), deleted.constEnd(), func);
std::for_each(unmanaged.constBegin(), unmanaged.constEnd(), func);
std::for_each(m_unmanaged.constBegin(), m_unmanaged.constEnd(), func);
std::for_each(m_internalClients.constBegin(), m_internalClients.constEnd(), func);
}
......
......@@ -226,7 +226,7 @@ public:
* @return List of unmanaged "clients" currently registered in Workspace
*/
const QList<Unmanaged *> &unmanagedList() const {
return unmanaged;
return m_unmanaged;
}
/**
* @return List of deleted "clients" currently managed by Workspace
......@@ -600,7 +600,7 @@ private:
QList<X11Client *> clients;
QList<AbstractClient*> m_allClients;
QList<Unmanaged *> unmanaged;
QList<Unmanaged *> m_unmanaged;
QList<Deleted *> deleted;
QList<InternalClient *> m_internalClients;
......@@ -789,7 +789,7 @@ void Workspace::forEachClient(std::function< void (X11Client *) > func)
inline
void Workspace::forEachUnmanaged(std::function< void (Unmanaged*) > func)
{
std::for_each(unmanaged.constBegin(), unmanaged.constEnd(), func);
std::for_each(m_unmanaged.constBegin(), m_unmanaged.constEnd(), func);
}
inline bool Workspace::hasClient(const X11Client *c)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment