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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_gtk.cc

Issue 9720037: Linux/Gtk: Setting last_mouse_down_ to NULL on focus-out of the render widget for context menu popu… (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_widget_host_view_gtk.h" 5 #include "content/browser/renderer_host/render_widget_host_view_gtk.h"
6 6
7 // If this gets included after the gtk headers, then a bunch of compiler 7 // If this gets included after the gtk headers, then a bunch of compiler
8 // errors happen because of a "#define Status int" in Xlib.h, which interacts 8 // errors happen because of a "#define Status int" in Xlib.h, which interacts
9 // badly with net::URLRequestStatus::Status. 9 // badly with net::URLRequestStatus::Status.
10 #include "content/common/view_messages.h" 10 #include "content/common/view_messages.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 RenderWidgetHostImpl::FromRWHV(host_view)->SetActive(false); 250 RenderWidgetHostImpl::FromRWHV(host_view)->SetActive(false);
251 RenderWidgetHostImpl::FromRWHV(host_view)->Blur(); 251 RenderWidgetHostImpl::FromRWHV(host_view)->Blur();
252 } 252 }
253 253
254 // Prevents us from stealing input context focus in OnGrabNotify() handler. 254 // Prevents us from stealing input context focus in OnGrabNotify() handler.
255 host_view->was_imcontext_focused_before_grab_ = false; 255 host_view->was_imcontext_focused_before_grab_ = false;
256 256
257 // Disable the GtkIMContext object. 257 // Disable the GtkIMContext object.
258 host_view->im_context_->OnFocusOut(); 258 host_view->im_context_->OnFocusOut();
259 259
260 host_view->set_last_mouse_down(NULL);
261
260 return TRUE; 262 return TRUE;
261 } 263 }
262 264
263 // Called when we are shadowed or unshadowed by a keyboard grab (which will 265 // Called when we are shadowed or unshadowed by a keyboard grab (which will
264 // occur for activatable popups, such as dropdown menus). Popup windows do not 266 // occur for activatable popups, such as dropdown menus). Popup windows do not
265 // take focus, so we never get a focus out or focus in event when they are 267 // take focus, so we never get a focus out or focus in event when they are
266 // shown, and must rely on this signal instead. 268 // shown, and must rely on this signal instead.
267 static void OnGrabNotify(GtkWidget* widget, gboolean was_grabbed, 269 static void OnGrabNotify(GtkWidget* widget, gboolean was_grabbed,
268 RenderWidgetHostViewGtk* host_view) { 270 RenderWidgetHostViewGtk* host_view) {
269 if (was_grabbed) { 271 if (was_grabbed) {
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after
1416 return new RenderWidgetHostViewGtk(widget); 1418 return new RenderWidgetHostViewGtk(widget);
1417 } 1419 }
1418 1420
1419 // static 1421 // static
1420 void content::RenderWidgetHostViewPort::GetDefaultScreenInfo( 1422 void content::RenderWidgetHostViewPort::GetDefaultScreenInfo(
1421 WebKit::WebScreenInfo* results) { 1423 WebKit::WebScreenInfo* results) {
1422 GdkWindow* gdk_window = 1424 GdkWindow* gdk_window =
1423 gdk_display_get_default_group(gdk_display_get_default()); 1425 gdk_display_get_default_group(gdk_display_get_default());
1424 content::GetScreenInfoFromNativeWindow(gdk_window, results); 1426 content::GetScreenInfoFromNativeWindow(gdk_window, results);
1425 } 1427 }
OLDNEW
« 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