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

Issue 199106: Fix focus bug with shell dialogs (Closed)

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

Description

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 scroll-bars, right-click to do a 'save as'. Close the dialog. The arrow keys should let you scroll the page. Accelerators such as Ctrl-T 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. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=26135

Patch Set 1 #

Patch Set 2 : '' #

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

Messages

Total messages: 2 (0 generated)
jcampan
11 years, 3 months ago (2009-09-14 17:33:20 UTC) #1
ananta
11 years, 3 months ago (2009-09-14 18:52:00 UTC) #2
LGTM

Powered by Google App Engine
This is Rietveld 408576698