]> Pileus Git - ~andy/gtk/commitdiff
Merged from stable.
authorKristian Rietveld <kris@gtk.org>
Sat, 12 Jul 2003 13:44:31 +0000 (13:44 +0000)
committerKristian Rietveld <kristian@src.gnome.org>
Sat, 12 Jul 2003 13:44:31 +0000 (13:44 +0000)
Sat Jul 12 15:51:18 2003  Kristian Rietveld  <kris@gtk.org>

Merged from stable.

* gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): use
gdk_window_get_pointer instead of gdk_display_get_window_at_pointer
to avoid a roundtrip (#110272, Owen Taylor).

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtktreeview.c

index 174a0bea130b9dcfe8f1174584057998ed787a10..2e6ac680f27cb6ec3594648134c70f874d686891 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Sat Jul 12 15:51:18 2003  Kristian Rietveld  <kris@gtk.org>
+
+       Merged from stable.
+
+       * gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): use
+       gdk_window_get_pointer instead of gdk_display_get_window_at_pointer
+       to avoid a roundtrip (#110272, Owen Taylor).
+
 Sat Jul 12 15:28:26 2003  Kristian Rietveld  <kris@gtk.org>
 
        Merged from stable.
@@ -6,7 +14,7 @@ Sat Jul 12 15:28:26 2003  Kristian Rietveld  <kris@gtk.org>
        testcase provided by Timo Sirainen, #111500, testcase provided by
        manu, #113241, reported by Pedro Gimeno/Michael Natterer.
 
-       *  gtk/gtktreeview.c (validate_visible_area): scrolling to a dy
+       * gtk/gtktreeview.c (validate_visible_area): scrolling to a dy
        which is equal to the lower border of the window means scrolling
        to an invisible row, always update the dy when scrolling to an
        invisible row, corrected area_above/below calculations for
index 174a0bea130b9dcfe8f1174584057998ed787a10..2e6ac680f27cb6ec3594648134c70f874d686891 100644 (file)
@@ -1,3 +1,11 @@
+Sat Jul 12 15:51:18 2003  Kristian Rietveld  <kris@gtk.org>
+
+       Merged from stable.
+
+       * gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): use
+       gdk_window_get_pointer instead of gdk_display_get_window_at_pointer
+       to avoid a roundtrip (#110272, Owen Taylor).
+
 Sat Jul 12 15:28:26 2003  Kristian Rietveld  <kris@gtk.org>
 
        Merged from stable.
@@ -6,7 +14,7 @@ Sat Jul 12 15:28:26 2003  Kristian Rietveld  <kris@gtk.org>
        testcase provided by Timo Sirainen, #111500, testcase provided by
        manu, #113241, reported by Pedro Gimeno/Michael Natterer.
 
-       *  gtk/gtktreeview.c (validate_visible_area): scrolling to a dy
+       * gtk/gtktreeview.c (validate_visible_area): scrolling to a dy
        which is equal to the lower border of the window means scrolling
        to an invisible row, always update the dy when scrolling to an
        invisible row, corrected area_above/below calculations for
index 174a0bea130b9dcfe8f1174584057998ed787a10..2e6ac680f27cb6ec3594648134c70f874d686891 100644 (file)
@@ -1,3 +1,11 @@
+Sat Jul 12 15:51:18 2003  Kristian Rietveld  <kris@gtk.org>
+
+       Merged from stable.
+
+       * gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): use
+       gdk_window_get_pointer instead of gdk_display_get_window_at_pointer
+       to avoid a roundtrip (#110272, Owen Taylor).
+
 Sat Jul 12 15:28:26 2003  Kristian Rietveld  <kris@gtk.org>
 
        Merged from stable.
@@ -6,7 +14,7 @@ Sat Jul 12 15:28:26 2003  Kristian Rietveld  <kris@gtk.org>
        testcase provided by Timo Sirainen, #111500, testcase provided by
        manu, #113241, reported by Pedro Gimeno/Michael Natterer.
 
-       *  gtk/gtktreeview.c (validate_visible_area): scrolling to a dy
+       * gtk/gtktreeview.c (validate_visible_area): scrolling to a dy
        which is equal to the lower border of the window means scrolling
        to an invisible row, always update the dy when scrolling to an
        invisible row, corrected area_above/below calculations for
index 174a0bea130b9dcfe8f1174584057998ed787a10..2e6ac680f27cb6ec3594648134c70f874d686891 100644 (file)
@@ -1,3 +1,11 @@
+Sat Jul 12 15:51:18 2003  Kristian Rietveld  <kris@gtk.org>
+
+       Merged from stable.
+
+       * gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): use
+       gdk_window_get_pointer instead of gdk_display_get_window_at_pointer
+       to avoid a roundtrip (#110272, Owen Taylor).
+
 Sat Jul 12 15:28:26 2003  Kristian Rietveld  <kris@gtk.org>
 
        Merged from stable.
@@ -6,7 +14,7 @@ Sat Jul 12 15:28:26 2003  Kristian Rietveld  <kris@gtk.org>
        testcase provided by Timo Sirainen, #111500, testcase provided by
        manu, #113241, reported by Pedro Gimeno/Michael Natterer.
 
-       *  gtk/gtktreeview.c (validate_visible_area): scrolling to a dy
+       * gtk/gtktreeview.c (validate_visible_area): scrolling to a dy
        which is equal to the lower border of the window means scrolling
        to an invisible row, always update the dy when scrolling to an
        invisible row, corrected area_above/below calculations for
index 174a0bea130b9dcfe8f1174584057998ed787a10..2e6ac680f27cb6ec3594648134c70f874d686891 100644 (file)
@@ -1,3 +1,11 @@
+Sat Jul 12 15:51:18 2003  Kristian Rietveld  <kris@gtk.org>
+
+       Merged from stable.
+
+       * gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): use
+       gdk_window_get_pointer instead of gdk_display_get_window_at_pointer
+       to avoid a roundtrip (#110272, Owen Taylor).
+
 Sat Jul 12 15:28:26 2003  Kristian Rietveld  <kris@gtk.org>
 
        Merged from stable.
@@ -6,7 +14,7 @@ Sat Jul 12 15:28:26 2003  Kristian Rietveld  <kris@gtk.org>
        testcase provided by Timo Sirainen, #111500, testcase provided by
        manu, #113241, reported by Pedro Gimeno/Michael Natterer.
 
-       *  gtk/gtktreeview.c (validate_visible_area): scrolling to a dy
+       * gtk/gtktreeview.c (validate_visible_area): scrolling to a dy
        which is equal to the lower border of the window means scrolling
        to an invisible row, always update the dy when scrolling to an
        invisible row, corrected area_above/below calculations for
index c09717a8cdb649a7c932ded3bef15b496f145d12..fda9f095f285ec1ba3907d7c31fc872209aead39 100644 (file)
@@ -9509,6 +9509,7 @@ gtk_tree_view_real_collapse_row (GtkTreeView *tree_view,
   gint x, y;
   GList *list;
   GdkDisplay *display;
+  GdkWindow *child, *parent;
 
   if (node->children == NULL)
     return FALSE;
@@ -9655,12 +9656,19 @@ gtk_tree_view_real_collapse_row (GtkTreeView *tree_view,
    * again. To do this, we fake a motion event and send it to ourselves. */
 
   display = gdk_drawable_get_display (tree_view->priv->bin_window);
-  if (gdk_display_get_window_at_pointer (display, &x, &y) == tree_view->priv->bin_window)
+  child = tree_view->priv->bin_window;
+  parent = gdk_window_get_parent (child);
+
+  if (gdk_window_get_pointer (parent, &x, &y, NULL) == child)
     {
       GdkEventMotion event;
+      gint child_x, child_y;
+
+      gdk_window_get_position (child, &child_x, &child_y);
+
       event.window = tree_view->priv->bin_window;
-      event.x = x;
-      event.y = y;
+      event.x = x - child_x;
+      event.y = y - child_y;
 
       /* despite the fact this isn't a real event, I'm almost positive it will
        * never trigger a drag event.  maybe_drag is the only function that uses