Commit 3968d02a authored by Andy Hertzfeld's avatar Andy Hertzfeld
Browse files

fixed bug 5750, accepting drops by folders quirky at zoom levels below


	* libnautilus-extensions/nautilus-icon-dnd.c:
	(nautilus_icon_container_item_at):
	fixed bug 5750, accepting drops by folders quirky at zoom levels
	below 100%. The problem was that nautilus_icon_container_item_at
	was constructing a single pixel rectangle for hit-testing, that
	sometimes turned into a zero pixel rectangle when scaled down,
	depending on how things rounded off.  Fixed by using the
	canvas scale factor when building the rectangle, ensuring that
	it never becomes empty.
parent 5dfee0c3
2001-01-27 Rebecca Schulman <rebecka@eazel.com>
2001-01-26 Andy Hertzfeld <andy@eazel.com>
* libnautilus-extensions/nautilus-icon-dnd.c:
(nautilus_icon_container_item_at):
fixed bug 5750, accepting drops by folders quirky at zoom levels
below 100%. The problem was that nautilus_icon_container_item_at
was constructing a single pixel rectangle for hit-testing, that
sometimes turned into a zero pixel rectangle when scaled down,
depending on how things rounded off. Fixed by using the
canvas scale factor when building the rectangle, ensuring that
it never becomes empty.
2001-01-26 Rebecca Schulman <rebecka@eazel.com>
Fix bugs 4094, 4425, 5201 and 4106 about inappopriate
applications being offered to view remote files.
This change filters applications that don't support
......
......@@ -492,13 +492,18 @@ nautilus_icon_container_item_at (NautilusIconContainer *container,
int x, int y)
{
GList *p;
int size;
ArtDRect point;
/* hit test a single pixel rectangle */
/* build the hit-test rectangle. Base the size on the scale factor to ensure that it is
* non-empty even at the smallest scale factor
*/
size = MAX (1, 1 + (1 / GNOME_CANVAS (container)->pixels_per_unit));
point.x0 = x;
point.y0 = y;
point.x1 = x + 1;
point.y1 = y + 1;
point.x1 = x + size;
point.y1 = y + size;
for (p = container->details->icons; p != NULL; p = p->next) {
NautilusIcon *icon;
......
......@@ -492,13 +492,18 @@ nautilus_icon_container_item_at (NautilusIconContainer *container,
int x, int y)
{
GList *p;
int size;
ArtDRect point;
/* hit test a single pixel rectangle */
/* build the hit-test rectangle. Base the size on the scale factor to ensure that it is
* non-empty even at the smallest scale factor
*/
size = MAX (1, 1 + (1 / GNOME_CANVAS (container)->pixels_per_unit));
point.x0 = x;
point.y0 = y;
point.x1 = x + 1;
point.y1 = y + 1;
point.x1 = x + size;
point.y1 = y + size;
for (p = container->details->icons; p != NULL; p = p->next) {
NautilusIcon *icon;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment