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

Unified Diff: ui/views/widget/desktop_aura/x11_desktop_handler.cc

Issue 1045443002: Make File-Picker modal on Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated comments and moved input-focus code Created 5 years, 6 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 | « ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b7ca334936c924ce4cfac5ed073e300c0c6779ae..259a3f68a2e1fd9e6c98832e7bc95faf8acf7ea1 100644
--- a/ui/views/widget/desktop_aura/x11_desktop_handler.cc
+++ b/ui/views/widget/desktop_aura/x11_desktop_handler.cc
@@ -216,8 +216,13 @@ void X11DesktopHandler::OnActiveWindowChanged(::Window xid,
if (active_state == ACTIVE) {
DesktopWindowTreeHostX11* new_host =
views::DesktopWindowTreeHostX11::GetHostForXID(xid);
- if (new_host)
+ if (new_host) {
new_host->HandleNativeWidgetActivationChanged(true);
sadrul 2015/07/08 15:02:31 We don't actually want to call this if |new_host|
joone 2015/07/08 17:16:45 Yes, we may not need to call this. I will test it.
+ // Set focus to the modal dialog instead of the host window.
+ if (new_host->GetModalDialog())
+ XSetInputFocus(xdisplay_, new_host->GetModalDialog(),
+ RevertToParent, CurrentTime);
+ }
}
}
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698