Index: ui/views/widget/desktop_aura/x11_desktop_handler.cc |
diff --git a/ui/views/widget/desktop_aura/x11_desktop_handler.cc b/ui/views/widget/desktop_aura/x11_desktop_handler.cc |
index 0d764e4f872f976f7d4cb0f6c68544bec8559a93..f33d4163e5f9125a8db3acd247a10fecd66e132b 100644 |
--- a/ui/views/widget/desktop_aura/x11_desktop_handler.cc |
+++ b/ui/views/widget/desktop_aura/x11_desktop_handler.cc |
@@ -182,12 +182,13 @@ void X11DesktopHandler::OnActiveWindowChanged(::Window xid) { |
if (old_host) |
old_host->HandleNativeWidgetActivationChanged(false); |
+ // Update the current window ID to effectively change the active widget. |
+ current_window_ = xid; |
+ |
DesktopWindowTreeHostX11* new_host = |
views::DesktopWindowTreeHostX11::GetHostForXID(xid); |
if (new_host) |
new_host->HandleNativeWidgetActivationChanged(true); |
- |
- current_window_ = xid; |
} |
} // namespace views |