+Tue Jan 8 15:53:28 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c (gtk_drag_find_widget): Fix coordinate
+ translations, once and for all.
+
+ * gtk/gtktextbuffer.c (paste_from_buffer): Free
+ the ClipboardRequest structure. (#66198, HideToshi
+ Tajima)
+
2002-01-08 jacob berkman <jacob@ximian.com>
* gtk/gtklayout.c (gtk_layout_move_internal): queue a resize on
* gtk/gtkpaned.c (gtk_paned_expose): Don't draw
the handle if we aren't showing both children.
+ (#68135, Diego Gonzalez)
Tue Jan 8 14:45:43 2002 Owen Taylor <otaylor@redhat.com>
+Tue Jan 8 15:53:28 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c (gtk_drag_find_widget): Fix coordinate
+ translations, once and for all.
+
+ * gtk/gtktextbuffer.c (paste_from_buffer): Free
+ the ClipboardRequest structure. (#66198, HideToshi
+ Tajima)
+
2002-01-08 jacob berkman <jacob@ximian.com>
* gtk/gtklayout.c (gtk_layout_move_internal): queue a resize on
* gtk/gtkpaned.c (gtk_paned_expose): Don't draw
the handle if we aren't showing both children.
+ (#68135, Diego Gonzalez)
Tue Jan 8 14:45:43 2002 Owen Taylor <otaylor@redhat.com>
+Tue Jan 8 15:53:28 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c (gtk_drag_find_widget): Fix coordinate
+ translations, once and for all.
+
+ * gtk/gtktextbuffer.c (paste_from_buffer): Free
+ the ClipboardRequest structure. (#66198, HideToshi
+ Tajima)
+
2002-01-08 jacob berkman <jacob@ximian.com>
* gtk/gtklayout.c (gtk_layout_move_internal): queue a resize on
* gtk/gtkpaned.c (gtk_paned_expose): Don't draw
the handle if we aren't showing both children.
+ (#68135, Diego Gonzalez)
Tue Jan 8 14:45:43 2002 Owen Taylor <otaylor@redhat.com>
+Tue Jan 8 15:53:28 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c (gtk_drag_find_widget): Fix coordinate
+ translations, once and for all.
+
+ * gtk/gtktextbuffer.c (paste_from_buffer): Free
+ the ClipboardRequest structure. (#66198, HideToshi
+ Tajima)
+
2002-01-08 jacob berkman <jacob@ximian.com>
* gtk/gtklayout.c (gtk_layout_move_internal): queue a resize on
* gtk/gtkpaned.c (gtk_paned_expose): Don't draw
the handle if we aren't showing both children.
+ (#68135, Diego Gonzalez)
Tue Jan 8 14:45:43 2002 Owen Taylor <otaylor@redhat.com>
+Tue Jan 8 15:53:28 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c (gtk_drag_find_widget): Fix coordinate
+ translations, once and for all.
+
+ * gtk/gtktextbuffer.c (paste_from_buffer): Free
+ the ClipboardRequest structure. (#66198, HideToshi
+ Tajima)
+
2002-01-08 jacob berkman <jacob@ximian.com>
* gtk/gtklayout.c (gtk_layout_move_internal): queue a resize on
* gtk/gtkpaned.c (gtk_paned_expose): Don't draw
the handle if we aren't showing both children.
+ (#68135, Diego Gonzalez)
Tue Jan 8 14:45:43 2002 Owen Taylor <otaylor@redhat.com>
+Tue Jan 8 15:53:28 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c (gtk_drag_find_widget): Fix coordinate
+ translations, once and for all.
+
+ * gtk/gtktextbuffer.c (paste_from_buffer): Free
+ the ClipboardRequest structure. (#66198, HideToshi
+ Tajima)
+
2002-01-08 jacob berkman <jacob@ximian.com>
* gtk/gtklayout.c (gtk_layout_move_internal): queue a resize on
* gtk/gtkpaned.c (gtk_paned_expose): Don't draw
the handle if we aren't showing both children.
+ (#68135, Diego Gonzalez)
Tue Jan 8 14:45:43 2002 Owen Taylor <otaylor@redhat.com>
+Tue Jan 8 15:53:28 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkdnd.c (gtk_drag_find_widget): Fix coordinate
+ translations, once and for all.
+
+ * gtk/gtktextbuffer.c (paste_from_buffer): Free
+ the ClipboardRequest structure. (#66198, HideToshi
+ Tajima)
+
2002-01-08 jacob berkman <jacob@ximian.com>
* gtk/gtklayout.c (gtk_layout_move_internal): queue a resize on
* gtk/gtkpaned.c (gtk_paned_expose): Don't draw
the handle if we aren't showing both children.
+ (#68135, Diego Gonzalez)
Tue Jan 8 14:45:43 2002 Owen Taylor <otaylor@redhat.com>
GtkDragFindData *data)
{
GtkAllocation new_allocation;
+ gint allocation_to_window_x = 0;
+ gint allocation_to_window_y = 0;
gint x_offset = 0;
gint y_offset = 0;
if (widget->parent)
{
- gint tx, ty, twidth, theight;
+ gint tx, ty;
GdkWindow *window = widget->window;
- /* Correct for the fact that the allocation is relative
- * to the parent window for window widgets, not to widget->window.
+ /* Compute the offset from allocation-relative to
+ * window-relative coordinates.
*/
+ allocation_to_window_x = widget->allocation.x;
+ allocation_to_window_y = widget->allocation.y;
+
if (!GTK_WIDGET_NO_WINDOW (widget))
{
+ /* The allocation is relative to the parent window for
+ * window widgets, not to widget->window.
+ */
gdk_window_get_position (window, &tx, &ty);
- new_allocation.x -= tx;
- new_allocation.y -= ty;
+ allocation_to_window_x -= tx;
+ allocation_to_window_y -= ty;
}
+ new_allocation.x = 0 + allocation_to_window_x;
+ new_allocation.y = 0 + allocation_to_window_y;
+
while (window && window != widget->parent->window)
- {
- gdk_window_get_size (window, &twidth, &theight);
+ {
+ GdkRectangle window_rect = { 0, 0, 0, 0 };
+
+ gdk_window_get_size (window, &window_rect.width, &window_rect.height);
- if (new_allocation.x < 0)
- {
- new_allocation.width += new_allocation.x;
- new_allocation.x = 0;
- }
- if (new_allocation.y < 0)
- {
- new_allocation.height += new_allocation.y;
- new_allocation.y = 0;
- }
- if (new_allocation.x + new_allocation.width > twidth)
- new_allocation.width = twidth - new_allocation.x;
- if (new_allocation.y + new_allocation.height > theight)
- new_allocation.height = theight - new_allocation.y;
+ gdk_rectangle_intersect (&new_allocation, &window_rect, &new_allocation);
gdk_window_get_position (window, &tx, &ty);
new_allocation.x += tx;
{
data->found = data->callback (widget,
data->context,
- data->x - new_allocation.x - x_offset,
- data->y - new_allocation.y - y_offset,
+ data->x - x_offset - allocation_to_window_x,
+ data->y - y_offset - allocation_to_window_y,
data->time);
/* If so, send a "drag_leave" to the last widget */
if (data->found)
post_paste_cleanup (request_data);
g_object_unref (G_OBJECT (src_buffer));
+ g_free (request_data);
}
static void