From b393d2f62f84782c32a4fdddd7e0310efc10a189 Mon Sep 17 00:00:00 2001 From: TingPing Date: Tue, 8 Oct 2013 18:40:11 -0400 Subject: Fix scroll buttons when using tabs --- src/fe-gtk/chanview-tabs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/fe-gtk/chanview-tabs.c b/src/fe-gtk/chanview-tabs.c index dd1d16b7..17461da7 100644 --- a/src/fe-gtk/chanview-tabs.c +++ b/src/fe-gtk/chanview-tabs.c @@ -67,15 +67,16 @@ cv_tabs_sizealloc (GtkWidget *widget, GtkAllocation *allocation, chanview *cv) gint viewport_size; inner = ((tabview *)cv)->inner; + GdkWindow *parent_win = gtk_widget_get_window (gtk_widget_get_parent (inner)); if (cv->vertical) { adj = gtk_viewport_get_vadjustment (GTK_VIEWPORT (gtk_widget_get_parent (inner))); - gdk_window_get_geometry (gtk_widget_get_parent_window (inner), 0, 0, 0, &viewport_size, 0); + gdk_window_get_geometry (parent_win, 0, 0, 0, &viewport_size, 0); } else { adj = gtk_viewport_get_hadjustment (GTK_VIEWPORT (gtk_widget_get_parent (inner))); - gdk_window_get_geometry (gtk_widget_get_parent_window (inner), 0, 0, &viewport_size, 0, 0); + gdk_window_get_geometry (parent_win, 0, 0, &viewport_size, 0, 0); } if (gtk_adjustment_get_upper (adj) <= viewport_size) -- cgit 1.4.1