diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-30 16:49:02 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-30 16:49:02 +0000 |
commit | f45a4a876abf10f458b5b8cd08179346537c0a74 (patch) | |
tree | d4a30f660641a0805818e3ba0292e7f240cdf126 /chrome/browser/gtk/browser_window_gtk.cc | |
parent | 06220e72d00336b075d8b279f578d5a0a5957e2b (diff) | |
download | chromium_src-f45a4a876abf10f458b5b8cd08179346537c0a74.zip chromium_src-f45a4a876abf10f458b5b8cd08179346537c0a74.tar.gz chromium_src-f45a4a876abf10f458b5b8cd08179346537c0a74.tar.bz2 |
Fix a bug where we were getting a resize cursor near the top of the web
contents area.
Fix a bug where the background color was not updated on theme change.
BUG=14956
Review URL: http://codereview.chromium.org/151063
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19599 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/browser_window_gtk.cc')
-rw-r--r-- | chrome/browser/gtk/browser_window_gtk.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc index 2cc2d196..aeae129 100644 --- a/chrome/browser/gtk/browser_window_gtk.cc +++ b/chrome/browser/gtk/browser_window_gtk.cc @@ -706,6 +706,7 @@ void BrowserWindowGtk::ShowHTMLDialog(HtmlDialogUIDelegate* delegate, } void BrowserWindowGtk::UserChangedTheme() { + SetBackgroundColor(); gdk_window_invalidate_rect(GTK_WIDGET(window_)->window, >K_WIDGET(window_)->allocation, TRUE); } @@ -1139,10 +1140,16 @@ gboolean BrowserWindowGtk::OnGtkAccelerator(GtkAccelGroup* accel_group, // static gboolean BrowserWindowGtk::OnMouseMoveEvent(GtkWidget* widget, GdkEventMotion* event, BrowserWindowGtk* browser) { + // Get the mouse position relative to |widget|. We can't just use event->x + // and event->y because that's relative to the gdk window that got the + // event. + gint x = 0; + gint y = 0; + gtk_widget_get_pointer(widget, &x, &y); + // Update the cursor if we're on the custom frame border. GdkWindowEdge edge; - bool has_hit_edge = browser->GetWindowEdge(static_cast<int>(event->x), - static_cast<int>(event->y), &edge); + bool has_hit_edge = browser->GetWindowEdge(x, y, &edge); GdkCursorType new_cursor = GDK_LAST_CURSOR; if (has_hit_edge) new_cursor = GdkWindowEdgeToGdkCursorType(edge); |