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

Unified Diff: chrome/browser/renderer_host/render_widget_host.cc

Issue 660069: Only send unprocessed key events upwards if the RenderWidgetHost is not hidde... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 10 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/browser/renderer_host/render_widget_host.cc
===================================================================
--- chrome/browser/renderer_host/render_widget_host.cc (revision 39987)
+++ chrome/browser/renderer_host/render_widget_host.cc (working copy)
@@ -1016,7 +1016,10 @@
NativeWebKeyboardEvent front_item = key_queue_.front();
key_queue_.pop_front();
- if (!processed) {
+ // We only send unprocessed key event upwards if we are not hidden,
+ // because the user has moved away from us and no longer expect any effect
+ // of this key event.
+ if (!processed && !is_hidden_) {
UnhandledKeyboardEvent(front_item);
// WARNING: This RenderWidgetHost can be deallocated at this point
« 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