public
Description: a tiny graphical app kit for ruby
Homepage: http://code.whytheluckystiff.net/shoes
Clone URL: git://github.com/why/shoes.git
 * shoes/native/gtk.c: using GtkAllocation to determine (x, y) was inaccurate, 
 leading to recursion when nested slots never registered as being correctly 
 placed. (reported by paulv on shoes day)
why (author)
Fri Jul 25 22:29:30 -0700 2008
commit  2e7a1162f46189731668ef86278f52b93a994917
tree    215f75a0c7fc2fe39573042e93ee7e9f54c7e8eb
parent  e559340c3534ee8303d85ae8183b130ba90ed287
...
610
611
612
 
613
614
615
 
 
 
 
616
617
 
618
619
620
...
610
611
612
613
614
 
 
615
616
617
618
619
620
621
622
623
624
0
@@ -610,11 +610,15 @@ shoes_group_clear(SHOES_GROUP_OS *group)
0
 void
0
 shoes_native_canvas_place(shoes_canvas *self_t, shoes_canvas *pc)
0
 {
0
+  int x, y, newy;
0
   GtkAllocation *a = &self_t->slot.canvas->allocation;
0
-  int newy = (self_t->place.iy + self_t->place.dy) - pc->slot.scrolly;
0
-  if (a->x != self_t->place.ix + self_t->place.dx || a->y != newy)
0
+  gtk_widget_translate_coordinates(self_t->slot.canvas, pc->slot.canvas, 0, 0, &x, &y);
0
+  newy = (self_t->place.iy + self_t->place.dy) - pc->slot.scrolly;
0
+
0
+  if (x != self_t->place.ix + self_t->place.dx || y != newy)
0
     gtk_fixed_move(GTK_FIXED(pc->slot.canvas), self_t->slot.canvas, 
0
         self_t->place.ix + self_t->place.dx, newy);
0
+
0
   if (a->width != self_t->place.iw || a->height != self_t->place.ih)
0
     gtk_widget_set_size_request(self_t->slot.canvas, self_t->place.iw, self_t->place.ih);
0
 }

Comments