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

Unified Diff: chrome/views/window.cc

Issue 39308: Allow clicks to windows disabled by modal dialogs to bring the entire modal s... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/views/window.cc
===================================================================
--- chrome/views/window.cc (revision 11197)
+++ chrome/views/window.cc (working copy)
@@ -789,6 +789,19 @@
}
LRESULT Window::OnSetCursor(HWND window, UINT hittest_code, UINT message) {
+ // If the window is disabled, it's because we're showing a modal dialog box.
+ // We need to let DefWindowProc handle the message. That's because
+ // DefWindowProc for WM_SETCURSOR with message = some kind of mouse button
+ // down message sends the top level window a WM_ACTIVATEAPP message, which we
+ // otherwise wouldn't get. The symptom of not doing this is that if the user
+ // has a window in the background with a modal dialog open, they can't click
+ // on the disabled background window to bring the entire stack to the front.
+ // This is annoying because they then have to move all the foreground windows
+ // out of the way to be able to activate said window. I love how on Windows,
+ // the answer isn't always logical.
+ if (!IsWindowEnabled(GetHWND()))
+ return WidgetWin::OnSetCursor(window, hittest_code, message);
+
int index = RC_NORMAL;
switch (hittest_code) {
case HTTOP:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698