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

Unified Diff: views/controls/menu/menu_host_gtk.cc

Issue 6756043: Consolidate Widget Event code, other cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and merge. Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/controls/menu/menu_host_gtk.h ('k') | views/controls/menu/menu_host_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/menu/menu_host_gtk.cc
diff --git a/views/controls/menu/menu_host_gtk.cc b/views/controls/menu/menu_host_gtk.cc
index 9ec992b94f30704a9da14313e71c456139d152af..0f4dfc75fc98dcb812a2c1934f06d8470e4fe8ef 100644
--- a/views/controls/menu/menu_host_gtk.cc
+++ b/views/controls/menu/menu_host_gtk.cc
@@ -89,7 +89,7 @@ void MenuHostGtk::SetMenuHostBounds(const gfx::Rect& bounds) {
}
void MenuHostGtk::ReleaseMenuHostCapture() {
- ReleaseNativeCapture();
+ ReleaseMouseCapture();
}
gfx::NativeWindow MenuHostGtk::GetMenuHostWindow() {
@@ -103,12 +103,12 @@ RootView* MenuHostGtk::CreateRootView() {
return new MenuHostRootView(this, submenu_);
}
-bool MenuHostGtk::ReleaseCaptureOnMouseReleased() {
+bool MenuHostGtk::ShouldReleaseCaptureOnMouseReleased() const {
return false;
}
-void MenuHostGtk::ReleaseNativeCapture() {
- WidgetGtk::ReleaseNativeCapture();
+void MenuHostGtk::ReleaseMouseCapture() {
+ WidgetGtk::ReleaseMouseCapture();
if (did_input_grab_) {
did_input_grab_ = false;
gdk_pointer_ungrab(GDK_CURRENT_TIME);
@@ -142,7 +142,7 @@ void MenuHostGtk::HandleXGrabBroke() {
void MenuHostGtk::HandleGtkGrabBroke() {
// Grab can be broken by drag & drop, other menu or screen locker.
if (did_input_grab_ && !destroying_) {
- ReleaseNativeCapture();
+ ReleaseMouseCapture();
CancelAllIfNoDrag();
}
WidgetGtk::HandleGtkGrabBroke();
@@ -160,7 +160,7 @@ void MenuHostGtk::DoCapture() {
gtk_grab_remove(current_grab_window);
// Make sure all app mouse/keyboard events are targetted at us only.
- SetNativeCapture();
+ SetMouseCapture();
// And do a grab. NOTE: we do this to ensure we get mouse/keyboard
// events from other apps, a grab done with gtk_grab_add doesn't get
« no previous file with comments | « views/controls/menu/menu_host_gtk.h ('k') | views/controls/menu/menu_host_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698