diff options
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/renderer/render_view.cc | 2 | ||||
-rw-r--r-- | chrome/renderer/render_widget.cc | 7 | ||||
-rw-r--r-- | chrome/renderer/render_widget.h | 3 |
3 files changed, 11 insertions, 1 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index ce9870f..1ddf4cc 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -2512,6 +2512,8 @@ void RenderView::SetTooltipText(WebView* webview, void RenderView::DidChangeSelection(bool is_empty_selection) { #if defined(OS_LINUX) + if (!handling_input_event_) + return; // TODO(estade): investigate incremental updates to the selection so that we // don't send the entire selection over IPC every time. if (!is_empty_selection) { diff --git a/chrome/renderer/render_widget.cc b/chrome/renderer/render_widget.cc index 6f2d5fc..3e11f4c8 100644 --- a/chrome/renderer/render_widget.cc +++ b/chrome/renderer/render_widget.cc @@ -54,6 +54,7 @@ RenderWidget::RenderWidget(RenderThreadBase* render_thread, bool activatable) is_hidden_(false), needs_repainting_on_restore_(false), has_focus_(false), + handling_input_event_(false), closing_(false), ime_is_active_(false), ime_control_enable_ime_(true), @@ -292,8 +293,11 @@ void RenderWidget::OnHandleInputEvent(const IPC::Message& message) { const char* data; int data_length; - if (!message.ReadData(&iter, &data, &data_length)) + handling_input_event_ = true; + if (!message.ReadData(&iter, &data, &data_length)) { + handling_input_event_ = false; return; + } const WebInputEvent* input_event = reinterpret_cast<const WebInputEvent*>(data); @@ -306,6 +310,7 @@ void RenderWidget::OnHandleInputEvent(const IPC::Message& message) { response->WriteBool(processed); Send(response); + handling_input_event_ = false; } void RenderWidget::OnMouseCaptureLost() { diff --git a/chrome/renderer/render_widget.h b/chrome/renderer/render_widget.h index ea7ef5e..7987d28 100644 --- a/chrome/renderer/render_widget.h +++ b/chrome/renderer/render_widget.h @@ -260,6 +260,9 @@ class RenderWidget : public IPC::Channel::Listener, // Indicates whether we have been focused/unfocused by the browser. bool has_focus_; + // Are we currently handling an input event? + bool handling_input_event_; + // True if we have requested this widget be closed. No more messages will // be sent, except for a Close. bool closing_; |