OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |