[gtk+/gtk-2-24] iconview: Fix autoscroll
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-24] iconview: Fix autoscroll
- Date: Sat, 3 Mar 2012 20:17:34 +0000 (UTC)
commit 4b1e2b08a7060f34fc350be97eac41b35acda361
Author: Benjamin Otte <otte redhat com>
Date: Sat Mar 3 21:10:46 2012 +0100
iconview: Fix autoscroll
... when the iconview is not the only child in it's parent GdkWindow.
gtk/gtkiconview.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index 54b3f3b..190fec8 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -6631,21 +6631,21 @@ remove_scroll_timeout (GtkIconView *icon_view)
static void
gtk_icon_view_autoscroll (GtkIconView *icon_view)
{
- gint px, py, x, y, width, height;
+ gint px, py, width, height;
gint hoffset, voffset;
gfloat value;
gdk_window_get_pointer (GTK_WIDGET (icon_view)->window, &px, &py, NULL);
- gdk_window_get_geometry (GTK_WIDGET (icon_view)->window, &x, &y, &width, &height, NULL);
+ gdk_window_get_geometry (GTK_WIDGET (icon_view)->window, NULL, NULL, &width, &height, NULL);
/* see if we are near the edge. */
- voffset = py - (y + 2 * SCROLL_EDGE_SIZE);
+ voffset = py - 2 * SCROLL_EDGE_SIZE;
if (voffset > 0)
- voffset = MAX (py - (y + height - 2 * SCROLL_EDGE_SIZE), 0);
+ voffset = MAX (py - (height - 2 * SCROLL_EDGE_SIZE), 0);
- hoffset = px - (x + 2 * SCROLL_EDGE_SIZE);
+ hoffset = px - 2 * SCROLL_EDGE_SIZE;
if (hoffset > 0)
- hoffset = MAX (px - (x + width - 2 * SCROLL_EDGE_SIZE), 0);
+ hoffset = MAX (px - (width - 2 * SCROLL_EDGE_SIZE), 0);
if (voffset != 0)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]