Changeset View
Changeset View
Standalone View
Standalone View
screenedge.cpp
Show First 20 Lines • Show All 980 Lines • ▼ Show 20 Line(s) | |||||
981 | 981 | | |||
982 | void ScreenEdges::reserve(AbstractClient *client, ElectricBorder border) | 982 | void ScreenEdges::reserve(AbstractClient *client, ElectricBorder border) | ||
983 | { | 983 | { | ||
984 | bool hadBorder = false; | 984 | bool hadBorder = false; | ||
985 | auto it = m_edges.begin(); | 985 | auto it = m_edges.begin(); | ||
986 | while (it != m_edges.end()) { | 986 | while (it != m_edges.end()) { | ||
987 | if ((*it)->client() == client) { | 987 | if ((*it)->client() == client) { | ||
988 | hadBorder = true; | 988 | hadBorder = true; | ||
989 | if ((*it)->border() == border) { | | |||
luebking: sure the sanity check is now really superfluous? | |||||
this did: if the border is the same, don't bother to re-reserve it, just return. one thing it could be compared is the old client geometry associated to the current edge, but it's info that wasn't saved mart: this did: if the border is the same, don't bother to re-reserve it, just return.
however, the… | |||||
990 | if (!(*it)->isReserved()) { | | |||
991 | (*it)->reserve(); | | |||
992 | } | | |||
993 | return; | | |||
994 | } else { | | |||
995 | delete *it; | 989 | delete *it; | ||
996 | it = m_edges.erase(it); | 990 | it = m_edges.erase(it); | ||
997 | } | | |||
998 | } else { | 991 | } else { | ||
999 | it++; | 992 | it++; | ||
1000 | } | 993 | } | ||
1001 | } | 994 | } | ||
1002 | 995 | | |||
1003 | if (border != ElectricNone) { | 996 | if (border != ElectricNone) { | ||
1004 | createEdgeForClient(client, border); | 997 | createEdgeForClient(client, border); | ||
1005 | } else { | 998 | } else { | ||
▲ Show 20 Lines • Show All 249 Lines • Show Last 20 Lines |
sure the sanity check is now really superfluous?