Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1011)

Unified Diff: src/platform/window_manager/stacking_manager.h

Issue 2078031: wm: Fix override-redirect window stacking bug. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222//chromeos.git
Patch Set: LOG(DFATAL) on invalid actor raise/lower Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/platform/window_manager/real_compositor.cc ('k') | src/platform/window_manager/stacking_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/window_manager/stacking_manager.h
diff --git a/src/platform/window_manager/stacking_manager.h b/src/platform/window_manager/stacking_manager.h
index dc0a9522cf68c5559007f544c8e019bf042670c2..aaba14d1b1f163fd329aeeab059ee39e07c57853 100644
--- a/src/platform/window_manager/stacking_manager.h
+++ b/src/platform/window_manager/stacking_manager.h
@@ -6,7 +6,6 @@
#define WINDOW_MANAGER_STACKING_MANAGER_H_
#include <map>
-#include <set>
#include <tr1/memory>
#include <gtest/gtest_prod.h> // for FRIEND_TEST() macro
@@ -84,7 +83,7 @@ class StackingManager {
// Is the passed-in X window one of our internal windows?
bool IsInternalWindow(XWindow xid) {
- return (xids_.find(xid) != xids_.end());
+ return (xid_to_layer_.find(xid) != xid_to_layer_.end());
}
// Stack a window (both its X window and its compositor actor) at the top
@@ -108,9 +107,14 @@ class StackingManager {
bool StackWindowRelativeToOtherWindow(
Window* win, Window* sibling, bool above, Layer layer);
+ // If 'xid' is being used as a layer's stacking reference point, return
+ // the actor corresponding to the layer. Returns NULL otherwise.
+ Compositor::Actor* GetActorIfLayerXid(XWindow xid);
+
private:
friend class BasicWindowManagerTest; // uses Get*ForLayer()
FRIEND_TEST(LayoutManagerTest, InitialWindowStacking); // uses 'layer_to_*'
+ FRIEND_TEST(WindowManagerTest, StackOverrideRedirectWindowsAboveLayers);
// Get a layer's name.
static const char* LayerToName(Layer layer);
@@ -131,8 +135,9 @@ class StackingManager {
std::map<Layer, std::tr1::shared_ptr<Compositor::Actor> >
layer_to_actor_;
- // Set we can use for quick lookup of whether an X window belongs to us.
- std::set<XWindow> xids_;
+ // Map we can use for quick lookup of whether an X window belongs to us,
+ // and to find the layer corresponding to an X window.
+ std::map<XWindow, Layer> xid_to_layer_;
};
} // namespace window_manager
« no previous file with comments | « src/platform/window_manager/real_compositor.cc ('k') | src/platform/window_manager/stacking_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698