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

Unified Diff: src/platform/window_manager/layout_manager.cc

Issue 506026: wm: Make _NET_ACTIVE_WINDOW contain transient windows. (Closed)
Patch Set: Created 11 years 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 | « no previous file | src/platform/window_manager/layout_manager_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/window_manager/layout_manager.cc
diff --git a/src/platform/window_manager/layout_manager.cc b/src/platform/window_manager/layout_manager.cc
index 66d1b218da2b086fb3556bac343fd489ba3fefe3..b8a2425fe95fa7535e826a53545bb100298d36f4 100644
--- a/src/platform/window_manager/layout_manager.cc
+++ b/src/platform/window_manager/layout_manager.cc
@@ -288,8 +288,6 @@ void LayoutManager::HandleWindowMap(Window* win) {
if (mode_ == MODE_ACTIVE &&
active_toplevel_ != NULL &&
active_toplevel_->IsWindowOrTransientFocused()) {
- // The _NET_ACTIVE_WINDOW property should already refer to
- // 'active_toplevel_', since it previously had the focus.
active_toplevel_->TakeFocus(wm_->GetCurrentTimeFromServer());
}
break;
@@ -492,10 +490,11 @@ bool LayoutManager::HandleFocusChange(XWindow xid, bool focus_in) {
return false;
toplevel->HandleFocusChange(win, focus_in);
- // When a transient window gets the focus, we say that its owner is the
- // "active" window (in the _NET_ACTIVE_WINDOW sense).
+ // Announce that the new window is the "active" window (in the
+ // _NET_ACTIVE_WINDOW sense), regardless of whether it's a toplevel
+ // window or a transient.
if (focus_in)
- wm_->SetActiveWindowProperty(toplevel->win()->xid());
+ wm_->SetActiveWindowProperty(win->xid());
return true;
}
« no previous file with comments | « no previous file | src/platform/window_manager/layout_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698