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

Issue 206004: Merge 26135 - The focus is not restored properly when a Windows modal dialog... (Closed)

Created:
11 years, 3 months ago by laforge
Modified:
9 years, 7 months ago
Reviewers:
jcampan
CC:
chromium-reviews_googlegroups.com, Ben Goodger (Google)
Visibility:
Public.

Description

Merge 26135 - The focus is not restored properly when a Windows modal dialog (such as "open file', 'print'...) is closed. We are running these dialogs from a different thread and they cause the browser window to get activated before it has been enabled. This causes the focus restoration to fail as the window is not enabled. In an earlier patch, I fixed it by storing/restoring the focus explicitly before/after the dialog is shown. But the fix did not apply to the print dialog which does not use the code I added my fix in. This CL reverts that previous fix and comes with a simpler solution: if when we are about to restore focus the window is disabled, we delay the focus restoration untill the window is enabled again. BUG=3380 TEST=Set the focus on a page with scrollbars, rightclick to do a 'save as'. Close the dialog. The arrow keys should let you scroll the page. Accelerators such as CtrlT should still work. Test 'open a file', 'print' and the font selection dialog (in the options). When closing the dialog the focus should return to the view that last had focus. Review URL: http://codereview.chromium.org/199106 TBR=jcampan@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=26162

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -43 lines) Patch
MM chrome/browser/views/shell_dialogs_win.cc View 5 chunks +1 line, -42 lines 0 comments Download
MM views/widget/widget_win.h View 1 chunk +4 lines, -0 lines 0 comments Download
MM views/widget/widget_win.cc View 3 chunks +17 lines, -1 line 0 comments Download

Messages

Total messages: 1 (0 generated)
laforge
11 years, 3 months ago (2009-09-14 21:21:18 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698