summaryrefslogtreecommitdiffstats
path: root/base/message_loop.cc
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-24 03:40:28 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-24 03:40:28 +0000
commit2ec01fe90944d9489cc3949c80fcc0826f9b1c76 (patch)
tree18a9250577efc5c9c8b53f140810f61ea59e10a1 /base/message_loop.cc
parent72e3c575424b731dcfe66dba8d009fb87c236002 (diff)
downloadchromium_src-2ec01fe90944d9489cc3949c80fcc0826f9b1c76.zip
chromium_src-2ec01fe90944d9489cc3949c80fcc0826f9b1c76.tar.gz
chromium_src-2ec01fe90944d9489cc3949c80fcc0826f9b1c76.tar.bz2
When we process the tickler message in our windows message pump, we should not dispatch
all window messages specifically if we are in the context of a Windows modal loop, i.e. a Windows API like TrackPopupMenu, etc. This is because these API's expect to handle input messages like keyboard and mouse messages by peeking them from the queue and handling them. Our message pump currently dispatches all windows messages while processing the tickler message which causes the windows modal loop to not see keyboard and mouse messages at times. Added a flag in the windows message loop which indicates if we are in the context of an os modal loop. If yes we just peek for WM_PAINT and timer and dispatch those and get out. Fixes bug http://code.google.com/p/chromium/issues/detail?id=59864 BUG=59864 Review URL: http://codereview.chromium.org/6676099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79248 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_loop.cc')
-rw-r--r--base/message_loop.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/base/message_loop.cc b/base/message_loop.cc
index 85e37d4..39881d1 100644
--- a/base/message_loop.cc
+++ b/base/message_loop.cc
@@ -123,6 +123,9 @@ MessageLoop::MessageLoop(Type type)
nestable_tasks_allowed_(true),
exception_restoration_(false),
state_(NULL),
+#ifdef OS_WIN
+ os_modal_loop_(false),
+#endif // OS_WIN
next_sequence_num_(0) {
DCHECK(!current()) << "should only have one message loop per thread";
lazy_tls_ptr.Pointer()->Set(this);