[Nautilus-list] bin_window vs. window coords.



Darin. Can you describe this:

2002-01-30  Darin Adler  <darin bentspoon com>

	* configure.in: Bump eel version required.
	
	* libnautilus-private/nautilus-icon-container.c:
	(rubberband_timeout_callback), (start_rubberbanding),
	(update_stretch_at_idle), (motion_notify_event):
	* libnautilus-private/nautilus-icon-dnd.c: (icon_get_data_binder),
	(nautilus_icon_container_position_shadow),
	(receive_dropped_keyword),
	(nautilus_icon_container_find_drop_target),
	(nautilus_icon_container_receive_dropped_icons),
	(nautilus_icon_container_get_drop_action),
	(nautilus_icon_dnd_update_drop_target), (nautilus_icon_dnd_init),
	(nautilus_icon_dnd_begin_drag):
	Use new eel functions that eliminate the funky interaction between
	the new GtkLayout and GnomeCanvas. Basically, all the functions
	that deal with window coordinates are getting bin_window
	coordinates instead. This should really be fixed in GnomeCanvas.

change a bit?

It seems at least the start_rubberbanding change has an error. The 
click event seems to get coordinates in the canvas window coordinates, 
because without this patch:
--- nautilus-icon-container.c   2002/02/21 19:55:41     1.254
+++ nautilus-icon-container.c   2002/02/22 06:24:07
@@ -1541,10 +1541,9 @@ start_rubberbanding (NautilusIconContain
                icon->was_selected_before_rubberband = icon->is_selected;
        }
 
-       eel_gnome_canvas_canvas_window_to_world
-               (GNOME_CANVAS (container),
-                event->x, event->y,
-                &band_info->start_x, &band_info->start_y);
+       gnome_canvas_window_to_world (GNOME_CANVAS (container),
+                                     event->x, event->y,
+                                     &band_info->start_x, &band_info->start_y);
 
        /* FIXME: The code to extract colors from the theme should be in FMDirectoryView, not here.
         * The NautilusIconContainer class should simply provide calls to set the colors.

the rubberband rectangle starts at the wrong place (offset by the 
canvas scroll position).

Stretching icons by the top handles seem to have the same problem.

/ Alex, to tired to think clearly





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]