aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lübking <thomas.luebking@gmail.com>2012-03-07 14:19:06 (GMT)
committerThomas Lübking <thomas.luebking@gmail.com>2012-03-13 20:38:54 (GMT)
commitd854fc98630bcdbc0d450ae7bc642240f5f535ad (patch)
tree2b0f100576ae941fc632a40557cb069730bd447e
parentbc1fdf770ffdeb02dcb0a05af7b681dcdc09c87a (diff)
select minimum layer per screen
BUG: 261799 REVIEW: 104186
-rw-r--r--kwin/layers.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/kwin/layers.cpp b/kwin/layers.cpp
index 31d1c49..13fa1b2 100644
--- a/kwin/layers.cpp
+++ b/kwin/layers.cpp
@@ -515,20 +515,23 @@ ClientList Workspace::constrainedStackingOrder()
kDebug(1212) << (void*)(*it) << *it << ":" << (*it)->layer();
#endif
// build the order from layers
- QHash< Group*, Layer > minimum_layer;
- for (ClientList::ConstIterator it = unconstrained_stacking_order.constBegin();
- it != unconstrained_stacking_order.constEnd();
- ++it) {
+ QVector< QMap<Group*, Layer> > minimum_layer(numScreens());
+ for (ClientList::ConstIterator it = unconstrained_stacking_order.constBegin(),
+ end = unconstrained_stacking_order.constEnd(); it != end; ++it) {
Layer l = (*it)->layer();
- // If a window is raised above some other window in the same window group
- // which is in the ActiveLayer (i.e. it's fulscreened), make sure it stays
- // above that window (see #95731).
- if (minimum_layer.contains((*it)->group())
- && minimum_layer[(*it)->group()] == ActiveLayer
- && (l == NormalLayer || l == AboveLayer)) {
- l = minimum_layer[(*it)->group()];
+
+ const int screen = (*it)->screen();
+ QMap< Group*, Layer >::iterator mLayer = minimum_layer[screen].find((*it)->group());
+ if (mLayer != minimum_layer[screen].end()) {
+ // If a window is raised above some other window in the same window group
+ // which is in the ActiveLayer (i.e. it's fulscreened), make sure it stays
+ // above that window (see #95731).
+ if (*mLayer == ActiveLayer && (l == NormalLayer || l == AboveLayer))
+ l = ActiveLayer;
+ *mLayer = l;
+ } else {
+ minimum_layer[screen].insertMulti((*it)->group(), l);
}
- minimum_layer[(*it)->group()] = l;
layer[ l ].append(*it);
}
ClientList stacking;