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

Unified Diff: chrome/browser/ui/gtk/download/download_shelf_gtk.cc

Issue 8885016: GTK: Even more changes from raw allocation access to gtk_widget_get_allocation(). (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove temporary Created 9 years 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
Index: chrome/browser/ui/gtk/download/download_shelf_gtk.cc
diff --git a/chrome/browser/ui/gtk/download/download_shelf_gtk.cc b/chrome/browser/ui/gtk/download/download_shelf_gtk.cc
index cc6901a794fa41c8a5d0d0848e1430a906def11b..a2a934d594b45e8a0dd13e1ed3c7ed9044e17d77 100644
--- a/chrome/browser/ui/gtk/download/download_shelf_gtk.cc
+++ b/chrome/browser/ui/gtk/download/download_shelf_gtk.cc
@@ -263,7 +263,9 @@ void DownloadShelfGtk::Observe(int type,
}
int DownloadShelfGtk::GetHeight() const {
- return slide_widget_->widget()->allocation.height;
+ GtkAllocation allocation;
+ gtk_widget_get_allocation(slide_widget_->widget(), &allocation);
+ return allocation.height;
}
void DownloadShelfGtk::RemoveDownloadItem(DownloadItemGtk* download_item) {
@@ -363,9 +365,11 @@ void DownloadShelfGtk::DidProcessEvent(GdkEvent* event) {
bool DownloadShelfGtk::IsCursorInShelfZone(
const gfx::Point& cursor_screen_coords) {
+ GtkAllocation allocation;
+ gtk_widget_get_allocation(shelf_.get(), &allocation);
+
gfx::Rect bounds(gtk_util::GetWidgetScreenPosition(shelf_.get()),
- gfx::Size(shelf_.get()->allocation.width,
- shelf_.get()->allocation.height));
+ gfx::Size(allocation.width, allocation.height));
// Negative insets expand the rectangle. We only expand the top.
bounds.Inset(gfx::Insets(-kShelfAuraSize, 0, 0, 0));
« no previous file with comments | « chrome/browser/ui/gtk/download/download_item_gtk.cc ('k') | chrome/browser/ui/gtk/infobars/infobar_container_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698