diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-13 03:17:17 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-13 03:17:17 +0000 |
commit | c4789ead19306b64518910ad8be4ff6b835cf509 (patch) | |
tree | 05c13ec5ac1cf7d1a09a5b45d030f49b671622b9 | |
parent | 19467c0bcc964f2af7e3ea07b08dad2cd46048bb (diff) | |
download | chromium_src-c4789ead19306b64518910ad8be4ff6b835cf509.zip chromium_src-c4789ead19306b64518910ad8be4ff6b835cf509.tar.gz chromium_src-c4789ead19306b64518910ad8be4ff6b835cf509.tar.bz2 |
Adds code to reset cursor on leave. We need to do this or cursor can
get stuck.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/274008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28787 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | views/window/window_gtk.cc | 8 | ||||
-rw-r--r-- | views/window/window_gtk.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/views/window/window_gtk.cc b/views/window/window_gtk.cc index 9c3cba6..8f64a5b3 100644 --- a/views/window/window_gtk.cc +++ b/views/window/window_gtk.cc @@ -332,6 +332,14 @@ gboolean WindowGtk::OnWindowStateEvent(GtkWidget* widget, return FALSE; } +gboolean WindowGtk::OnLeaveNotify(GtkWidget* widget, GdkEventCrossing* event) { + GdkCursor* cursor = gdk_cursor_new(GDK_LEFT_PTR); + gdk_window_set_cursor(widget->window, cursor); + gdk_cursor_destroy(cursor); + + return WidgetGtk::OnLeaveNotify(widget, event); +} + //////////////////////////////////////////////////////////////////////////////// // WindowGtk, protected: diff --git a/views/window/window_gtk.h b/views/window/window_gtk.h index 0f496c4..f7fffc7 100644 --- a/views/window/window_gtk.h +++ b/views/window/window_gtk.h @@ -66,6 +66,7 @@ class WindowGtk : public WidgetGtk, public Window { virtual void OnSizeAllocate(GtkWidget* widget, GtkAllocation* allocation); virtual gboolean OnWindowStateEvent(GtkWidget* widget, GdkEventWindowState* event); + virtual gboolean OnLeaveNotify(GtkWidget* widget, GdkEventCrossing* event); protected: // For the constructor. |